elfcode.h (FILE_ALIGN_: Renamed from EALIGN, to avoid conflict with Ultrix
header files. Also, lots of changes for PA elf and som support from Utah; see ChangeLog for details.
This commit is contained in:
parent
37e6f1d0e4
commit
3bca03362f
3 changed files with 227 additions and 84 deletions
120
bfd/ChangeLog
120
bfd/ChangeLog
|
@ -1,3 +1,114 @@
|
||||||
|
Thu Oct 21 12:16:26 1993 Ken Raeburn (raeburn@cygnus.com)
|
||||||
|
|
||||||
|
* elfcode.h (FILE_ALIGN): Renamed from EALIGN, to avoid conflict
|
||||||
|
with Ultrix header files.
|
||||||
|
|
||||||
|
* som.h (struct som_section_data_struct): Renamed from
|
||||||
|
som_section_data to avoid conflict with macro by that name.
|
||||||
|
|
||||||
|
Changes from Jeff Law and Peter Hoogenboom at Utah:
|
||||||
|
|
||||||
|
* elf32-hppa.c (hppa_elf_reloc): Target register for a 'jump
|
||||||
|
in delay slot' optimization in combination with a long call
|
||||||
|
stub should always be r31.
|
||||||
|
|
||||||
|
* elf32-hppa.c: (hppa_elf_relocate_insn): To be consistent
|
||||||
|
across all relocation types, retrieve instruction addends from
|
||||||
|
the relocation entry rather than from the instruction itself.
|
||||||
|
|
||||||
|
* elf32-hppa.c: (hppa_elf_relocate_insn): Fix a relocation
|
||||||
|
error that only occurred when the addend of an 'addil' or
|
||||||
|
'ldil' was larger than 21 bits and very close to a 2K byte
|
||||||
|
boundary.
|
||||||
|
|
||||||
|
* elf32-hppa.c: (hppa_elf_reloc): Handle the optimization in
|
||||||
|
which a jump is placed in the delay slot of a function call.
|
||||||
|
The jump was being accomplished via an adjustment to the
|
||||||
|
return pointer. This optimization would break the long call
|
||||||
|
stub code, if there was any.
|
||||||
|
|
||||||
|
* elf32-hppa.c: (hppa_elf_build_long_branch_stub): Corrections
|
||||||
|
to long branch stubs to avoid use of general register 2.
|
||||||
|
|
||||||
|
* hppa_stubs.h: New stub instructions.
|
||||||
|
|
||||||
|
* elfcode.h: Declare bfd_elf_find_section.
|
||||||
|
|
||||||
|
* som.h (som_section_data): Add new "subspace_index" field.
|
||||||
|
|
||||||
|
* som.c (setup_sections): Save the original SOM subspace index
|
||||||
|
in the BFD section associated with that subspace.
|
||||||
|
(som_get_symtab_upper_bound): Implement.
|
||||||
|
(som_get_symtab): Implement.
|
||||||
|
(som_print_symbol): Implement.
|
||||||
|
(som_slurp_string_table): New function to read a string table
|
||||||
|
from a SOM object file.
|
||||||
|
(som_section_from_subspace_index): New function to return the
|
||||||
|
section which corresponds to a SOM subspace index.
|
||||||
|
(som_slurp_symbol_table): New function to read the symbol
|
||||||
|
table from a SOM object file.
|
||||||
|
(som_make_empty_symbol): Check for errors from bfd_zalloc.
|
||||||
|
(som_new_section_hook): Initialize subspace_index field to
|
||||||
|
-1 instead of 0.
|
||||||
|
|
||||||
|
* som.c (som_object_setup): Fix polarity of test to set HAS_RELOC.
|
||||||
|
Set EXEC_P for executables.
|
||||||
|
(setup_sections): Correctly identify when a section has
|
||||||
|
relocations.
|
||||||
|
(log2): New function.
|
||||||
|
(setup_sections): Correctly convert between SOM alignments and BFD
|
||||||
|
alignments.
|
||||||
|
|
||||||
|
* som.c (setup_sections): Do not set SEC_ALLOC or SEC_LOAD
|
||||||
|
for sections which correspond to SOM spaces, doing so confuses
|
||||||
|
many utilities. Set assorted SEC_* flags for SOM subspaces
|
||||||
|
which correspond to BFD sections.
|
||||||
|
|
||||||
|
* elf32-hppa.c: (elf32_hppa_backend_fake_sections): The stab
|
||||||
|
string table should have sh_type == SHT_STRTAB. Add
|
||||||
|
processing to make it so.
|
||||||
|
|
||||||
|
* elfcode.h: (bfd_section_from_shdr): String tables (other
|
||||||
|
than .strtab) were not getting the file offsets recorded, so
|
||||||
|
they could not be read from disk.
|
||||||
|
|
||||||
|
* elfcode.h: (elf_make_sections): Leave the sh_addr field of
|
||||||
|
the section header and the vma field of a section at 0 if the
|
||||||
|
section is not part of the program execution image. (e.g.,
|
||||||
|
.stab)
|
||||||
|
|
||||||
|
* som.[hc]: Change target vector prefix from "hppa" to "som".
|
||||||
|
Consistently use obj_som prefix to access fields in backend data
|
||||||
|
structures. Fix all callers/references.
|
||||||
|
|
||||||
|
* som.h: Do not include files only needed for core file reading here.
|
||||||
|
Include a.out for both HOST_HPPAHPUX and HOST_HPPABSD. Delete
|
||||||
|
forward structure declarations, they are unnecessary.
|
||||||
|
(struct somdata): Delete aux_hdr, and hp_symbol_entry_size fields.
|
||||||
|
Change "symbols" to "symtab". Add "stringtab" and "reloc_filepos"
|
||||||
|
fields for future use. Change obj_som_* macros as appropriate.
|
||||||
|
(som_section_data): New structure to keep SOM specific information
|
||||||
|
about BFD sections (for future use).
|
||||||
|
|
||||||
|
* som.c: Provide PARAMS declarations for all functions currently
|
||||||
|
in this file.
|
||||||
|
(struct container): Delete unwanted structure definition.
|
||||||
|
(som_object_setup): Add comments. Use som_mkobject to allocate
|
||||||
|
SOM specific information in the BFD; use information from the
|
||||||
|
file and (possibly empty) auxiliary headers to initialize this
|
||||||
|
information. Delete redundant bfd_get_symcount (abfd) "calls".
|
||||||
|
(setup_sections): Return type is now boolean, fix return statements.
|
||||||
|
"Fix" handling of BSS like subspaces in the computation of the
|
||||||
|
containing space's size. If the subspace has relocations, set the
|
||||||
|
appropriate BFD section flags and record the index into and the
|
||||||
|
size of the fixup stream. Always return a value.
|
||||||
|
(som_object_p): Set bfd_error appropriately if errors are detected
|
||||||
|
from bfd_{read,seek} functions. Handle EXECLIBMAGIC type files.
|
||||||
|
Do not try to read a non-existant auxiliary header.
|
||||||
|
(som_mkobject): Flesh out.
|
||||||
|
(som_section_hook): Allocate space to hold SOM specific information
|
||||||
|
about sections.
|
||||||
|
|
||||||
Thu Oct 21 12:41:34 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
Thu Oct 21 12:41:34 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
|
||||||
gcc -Wall lint:
|
gcc -Wall lint:
|
||||||
|
@ -35,6 +146,15 @@ Wed Oct 20 10:28:27 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
|
||||||
* hosts/i386bsd.h [__bsdi__]: Define HOST_DATA_START_ADDR.
|
* hosts/i386bsd.h [__bsdi__]: Define HOST_DATA_START_ADDR.
|
||||||
|
|
||||||
|
Wed Oct 20 10:10:07 1993 Ken Raeburn (raeburn@cygnus.com)
|
||||||
|
|
||||||
|
* Makefile.in (HFILES): New variable, for use in "make dep".
|
||||||
|
(.dep): Depend on $(CFILES) and $(HFILES). Delete .dep1 and
|
||||||
|
remake it, so that "$?" is complete.
|
||||||
|
(.dep1): Don't need to remove .dep1 first.
|
||||||
|
(dep.sed): Depend on config.status, not Makefile.
|
||||||
|
(CFILES): Add nlm.c.
|
||||||
|
|
||||||
Tue Oct 19 15:26:26 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
Tue Oct 19 15:26:26 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||||
|
|
||||||
* coff-alpha.c: Implemented reloc handling for the linker, made
|
* coff-alpha.c: Implemented reloc handling for the linker, made
|
||||||
|
|
|
@ -57,8 +57,10 @@
|
||||||
#define FLDWS_MB_M8SP_FARG3 0x27d13027 /* fldws,mb -8(sp),farg3 */
|
#define FLDWS_MB_M8SP_FARG3 0x27d13027 /* fldws,mb -8(sp),farg3 */
|
||||||
#define BL_XXX_RP 0xe8400000 /* bl 0,rp */
|
#define BL_XXX_RP 0xe8400000 /* bl 0,rp */
|
||||||
#define NOP 0x08000240 /* nop */
|
#define NOP 0x08000240 /* nop */
|
||||||
|
#define STW_RP_M24SP 0x6bc23fd1 /* stw rp,-24(sr0,sp) */
|
||||||
#define STW_31_M24SP 0x6bdf3fd1 /* stw r31,-24(sr0,sp) */
|
#define STW_31_M24SP 0x6bdf3fd1 /* stw r31,-24(sr0,sp) */
|
||||||
#define LDW_M24SP_RP 0x4bc23fd1 /* ldw -24(sr0,sp),rp */
|
#define LDW_M24SP_RP 0x4bc23fd1 /* ldw -24(sr0,sp),rp */
|
||||||
|
#define LDW_M24SP_31 0x4bdf3fd1 /* ldw -24(sr0,sp),r31 */
|
||||||
#define BE_XXX_0_0 0xe0000000 /* be 0(sr0,0) */
|
#define BE_XXX_0_0 0xe0000000 /* be 0(sr0,0) */
|
||||||
#define BE_N_XXX_0_0 0xe0000002 /* be,n 0(sr0,0) */
|
#define BE_N_XXX_0_0 0xe0000002 /* be,n 0(sr0,0) */
|
||||||
#define BLE_XXX_0_0 0xe4000000 /* ble 0(sr0,0) */
|
#define BLE_XXX_0_0 0xe4000000 /* ble 0(sr0,0) */
|
||||||
|
@ -66,17 +68,25 @@
|
||||||
#define BLE_N_XXX_0_31 0xe7e00002 /* ble,n 0(sr0,r31) */
|
#define BLE_N_XXX_0_31 0xe7e00002 /* ble,n 0(sr0,r31) */
|
||||||
#define BLE_XXX_0_31 0xe7e00000 /* ble 0(sr0,r31) */
|
#define BLE_XXX_0_31 0xe7e00000 /* ble 0(sr0,r31) */
|
||||||
#define BE_N_XXX_0_31 0xe3e00002 /* be,n 0(sr0,r31) */
|
#define BE_N_XXX_0_31 0xe3e00002 /* be,n 0(sr0,r31) */
|
||||||
|
#define BE_XXX_0_31 0xe3e00000 /* be 0(sr0,r31) */
|
||||||
#define BE_N_XXX_0_RP 0xe0400002 /* be,n 0(sr0,rp) */
|
#define BE_N_XXX_0_RP 0xe0400002 /* be,n 0(sr0,rp) */
|
||||||
#define BE_XXX_0_RP 0xe0400000 /* be 0(sr0,rp) */
|
#define BE_XXX_0_RP 0xe0400000 /* be 0(sr0,rp) */
|
||||||
#define BLE_XXX_0_RP 0xe4400000 /* ble 0(sr0,rp) */
|
#define BLE_XXX_0_RP 0xe4400000 /* ble 0(sr0,rp) */
|
||||||
#define COPY_31_2 0x081f0242 /* copy r31,r2 */
|
#define COPY_31_2 0x081f0242 /* copy r31,r2 */
|
||||||
|
#define COPY_31_1 0x081f0241 /* copy r31,r1 */
|
||||||
|
#define COPY_1_31 0x0801025f /* copy r1,r31 */
|
||||||
#define LDIL_XXX_31 0x23e00000 /* ldil 0,r31 */
|
#define LDIL_XXX_31 0x23e00000 /* ldil 0,r31 */
|
||||||
#define LDIL_XXX_RP 0x20400000 /* ldil 0,rp */
|
#define LDIL_XXX_RP 0x20400000 /* ldil 0,rp */
|
||||||
#define LDO_0_26_26 0x375a0000 /* ldo 0(r26),r26 */
|
#define LDO_0_26_26 0x375a0000 /* ldo 0(r26),r26 */
|
||||||
|
#define LDSID_31_1 0x03e010a1 /* ldsid (r31),r1 */
|
||||||
#define LDSID_31_RP 0x03e010a2 /* ldsid (r31),rp */
|
#define LDSID_31_RP 0x03e010a2 /* ldsid (r31),rp */
|
||||||
|
#define LDSID_31_31 0x03e010bf /* ldsid (r31),r31 */
|
||||||
#define MTSP_RP_SR0 0x00021820 /* mtsp rp,sr0 */
|
#define MTSP_RP_SR0 0x00021820 /* mtsp rp,sr0 */
|
||||||
|
#define MTSP_1_SR0 0x00011820 /* mtsp r1,sr0 */
|
||||||
|
#define MTSP_31_SR0 0x001f1820 /* mtsp r31,sr0 */
|
||||||
#define LDO_0_26_26 0x375a0000 /* ldo 0(r26),r26 */
|
#define LDO_0_26_26 0x375a0000 /* ldo 0(r26),r26 */
|
||||||
#define ADDI_M8_SP 0xb7de07f1 /* addi -8,sp,sp */
|
#define ADDI_M8_SP 0xb7de07f1 /* addi -8,sp,sp */
|
||||||
#define LDW_M8SP_RP 0x4bc23ff1 /* ldw -8(sp),rp */
|
#define LDW_M8SP_RP 0x4bc23ff1 /* ldw -8(sp),rp */
|
||||||
#define BV_N_0RP 0xe840c002 /* bv,n 0(rp) */
|
#define BV_N_0_RP 0xe840c002 /* bv,n 0(rp) */
|
||||||
#define BV_N_0_26 0xeb40c002 /* bv,n 0(r26) */
|
#define BV_N_0_26 0xeb40c002 /* bv,n 0(r26) */
|
||||||
|
#define BV_N_0_31 0xebe0c002 /* bv,n 0(r31) */
|
||||||
|
|
|
@ -139,7 +139,7 @@ of a file.
|
||||||
. bfd_target_oasys_flavour,
|
. bfd_target_oasys_flavour,
|
||||||
. bfd_target_tekhex_flavour,
|
. bfd_target_tekhex_flavour,
|
||||||
. bfd_target_srec_flavour,
|
. bfd_target_srec_flavour,
|
||||||
. bfd_target_hppa_flavour} flavour;
|
. bfd_target_som_flavour} flavour;
|
||||||
|
|
||||||
The order of bytes within the data area of a file.
|
The order of bytes within the data area of a file.
|
||||||
|
|
||||||
|
@ -326,6 +326,7 @@ extern bfd_target a29kcoff_big_vec;
|
||||||
extern bfd_target a_out_adobe_vec;
|
extern bfd_target a_out_adobe_vec;
|
||||||
extern bfd_target aout_mips_big_vec;
|
extern bfd_target aout_mips_big_vec;
|
||||||
extern bfd_target aout_mips_little_vec;
|
extern bfd_target aout_mips_little_vec;
|
||||||
|
extern bfd_target apollocoff_vec;
|
||||||
extern bfd_target b_out_vec_big_host;
|
extern bfd_target b_out_vec_big_host;
|
||||||
extern bfd_target b_out_vec_little_host;
|
extern bfd_target b_out_vec_little_host;
|
||||||
extern bfd_target bfd_elf32_big_generic_vec;
|
extern bfd_target bfd_elf32_big_generic_vec;
|
||||||
|
@ -352,17 +353,21 @@ extern bfd_target h8500coff_vec;
|
||||||
extern bfd_target host_aout_vec;
|
extern bfd_target host_aout_vec;
|
||||||
extern bfd_target hp300bsd_vec;
|
extern bfd_target hp300bsd_vec;
|
||||||
extern bfd_target hp300hpux_vec;
|
extern bfd_target hp300hpux_vec;
|
||||||
extern bfd_target hppa_vec;
|
extern bfd_target som_vec;
|
||||||
extern bfd_target i386aout_vec;
|
extern bfd_target i386aout_vec;
|
||||||
extern bfd_target i386bsd_vec;
|
extern bfd_target i386bsd_vec;
|
||||||
|
extern bfd_target netbsd386_vec;
|
||||||
extern bfd_target i386coff_vec;
|
extern bfd_target i386coff_vec;
|
||||||
extern bfd_target i386linux_vec;
|
extern bfd_target i386linux_vec;
|
||||||
extern bfd_target i386lynx_vec;
|
extern bfd_target i386lynx_aout_vec;
|
||||||
|
extern bfd_target i386lynx_coff_vec;
|
||||||
extern bfd_target icoff_big_vec;
|
extern bfd_target icoff_big_vec;
|
||||||
extern bfd_target icoff_little_vec;
|
extern bfd_target icoff_little_vec;
|
||||||
extern bfd_target ieee_vec;
|
extern bfd_target ieee_vec;
|
||||||
extern bfd_target m68kcoff_vec;
|
extern bfd_target m68kcoff_vec;
|
||||||
extern bfd_target m68kcoffun_vec;
|
extern bfd_target m68kcoffun_vec;
|
||||||
|
extern bfd_target m68klynx_aout_vec;
|
||||||
|
extern bfd_target m68klynx_coff_vec;
|
||||||
extern bfd_target m88kbcs_vec;
|
extern bfd_target m88kbcs_vec;
|
||||||
extern bfd_target newsos3_vec;
|
extern bfd_target newsos3_vec;
|
||||||
extern bfd_target nlm32_big_generic_vec;
|
extern bfd_target nlm32_big_generic_vec;
|
||||||
|
@ -385,6 +390,7 @@ extern bfd_target symbolsrec_vec;
|
||||||
/* All of the xvecs for core files. */
|
/* All of the xvecs for core files. */
|
||||||
extern bfd_target aix386_core_vec;
|
extern bfd_target aix386_core_vec;
|
||||||
extern bfd_target hpux_core_vec;
|
extern bfd_target hpux_core_vec;
|
||||||
|
extern bfd_target osf_core_vec;
|
||||||
extern bfd_target sco_core_vec;
|
extern bfd_target sco_core_vec;
|
||||||
extern bfd_target trad_core_vec;
|
extern bfd_target trad_core_vec;
|
||||||
|
|
||||||
|
@ -456,20 +462,24 @@ bfd_target *target_vector[] = {
|
||||||
#endif
|
#endif
|
||||||
&hp300hpux_vec,
|
&hp300hpux_vec,
|
||||||
#if defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD)
|
#if defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD)
|
||||||
&hppa_vec,
|
&som_vec,
|
||||||
#endif
|
#endif
|
||||||
&i386aout_vec,
|
&i386aout_vec,
|
||||||
&i386bsd_vec,
|
&i386bsd_vec,
|
||||||
|
&netbsd386_vec,
|
||||||
&i386coff_vec,
|
&i386coff_vec,
|
||||||
#if 0
|
#if 0
|
||||||
&i386linux_vec,
|
&i386linux_vec,
|
||||||
#endif
|
#endif
|
||||||
&i386lynx_vec,
|
&i386lynx_aout_vec,
|
||||||
|
&i386lynx_coff_vec,
|
||||||
&icoff_big_vec,
|
&icoff_big_vec,
|
||||||
&icoff_little_vec,
|
&icoff_little_vec,
|
||||||
&ieee_vec,
|
&ieee_vec,
|
||||||
&m68kcoff_vec,
|
&m68kcoff_vec,
|
||||||
&m68kcoffun_vec,
|
&m68kcoffun_vec,
|
||||||
|
&m68klynx_aout_vec,
|
||||||
|
&m68klynx_coff_vec,
|
||||||
&m88kbcs_vec,
|
&m88kbcs_vec,
|
||||||
&newsos3_vec,
|
&newsos3_vec,
|
||||||
#if 0 /* No one seems to use this. */
|
#if 0 /* No one seems to use this. */
|
||||||
|
@ -514,6 +524,9 @@ bfd_target *target_vector[] = {
|
||||||
#ifdef HPUX_CORE
|
#ifdef HPUX_CORE
|
||||||
&hpux_core_vec,
|
&hpux_core_vec,
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef OSF_CORE
|
||||||
|
&osf_core_vec,
|
||||||
|
#endif
|
||||||
#ifdef SCO_CORE
|
#ifdef SCO_CORE
|
||||||
&sco_core_vec,
|
&sco_core_vec,
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue