| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* elf32-ppc.c (ppc_elf_relocate_section): Don't emit R_PPC_REL*
relocs in shared libraries which refer to local symbols. Cope
with addend when processing a GOT relocation.
* elf32-ppc.c (ppc_elf_size_dynamic_sections): Only create symbols
for sections that the linker didn't create.
(ppc_elf_finish_dynamic_sections): Only try to write out a section
symbol if it was created in ppc_elf_size_dynamic_sections.
(ppc_elf_relocate_section): Complain if we have to generate a reloc
relative to a section for which we didn't output a symbol.
* elf32-ppc.c (ppc_elf_size_dynamic_sections): Clean up. PLT
relocs are 'rela' relocs, like everything else. .rela.plt is not
a read-only section, so we don't have to special-case it.
* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Entries in the
.rela.bss section are (of course) 'rela' relocs not 'rel' relocs.
* elf32-ppc.c (ppc_elf_check_relocs): Initialise srelgot.
(ppc_elf_relocate_section): @got offsets are 4 from start of the
actual .got section.
* elflink.c (_bfd_elf_create_got_section): The three reserved
words start from the symbol '_GLOBAL_OFFSET_TABLE_'.
* elf32-ppc.c (ppc_elf_size_dynamic_sections): '.rela' is 5
characters, not 4.
* elf32-ppc.c (ppc_elf_check_relocs): Use
_bfd_elf_create_got_section to create the GOT rather than
ppc_elf_create_linker_section. Create the '.rela.got' section
ourselves.
(ppc_elf_finish_dynamic_symbol): Set up GOT relocations when a
symbol has a GOT entry.
(ppc_elf_relocate_section): Record when a symbol is used through
the GOT, and allocate space in the GOT for each such symbol.
(ppc_elf_adjust_dynamic_symbol): Delete unused .got.plt stuff.
(ppc_elf_create_linker_section): Delete unused LINKER_SECTION_GOT
stuff.
* elf32-ppc.c (ppc_elf_howto_raw): GOT16_HA relocs should be
treated in a similar way to ADDR16_HA relocs.
(ppc_elf_relocate_section): PLTREL24 relocs do not get copied into
shared objects; the linker must deal with them.
(ppc_elf_create_linker_section): Stop setting
_GLOBAL_OFFSET_TABLE_ to the wrong value; delete unused
LINKER_SECTION_PLT stuff.
(ppc_elf_check_relocs): Delete unused LINKER_SECTION_PLT stuff.
(ppc_elf_finish_dynamic_sections): Use BFD calls to get GOT
section, not ELF-specific calls.
(elf_backend_plt_not_loaded): Set to 1.
(elf_backend_got_symbol_offset): Set to 4.
* elf-bfd.h (elf_backend_data): Add 'plt_not_loaded' member
for when ld.so fills in the PLT; and 'got_symbol_offset' member.
* elflink.c (_bfd_elf_create_dynamic_sections): Apply
plt_not_loaded member.
(_bfd_elf_create_got_section): Apply got_symbol_offset.
* elfxx-target.h (elf_backend_plt_not_loaded): Set default to
'loaded'.
(elf_backend_G_O_T_offset): Set default to 0.
(elfNN_bed): Set added fields.
* elf32-ppc.c (ppc_elf_size_dynamic_sections): Was setting
DT_RELENT in shared objects; should be DT_RELAENT.
* elf32-ppc.c (ppc_elf_relocate_section): Propagate
R_PPC_ADDR16_HA relocs to shared objects. Cope with case where
such a reloc (in a non-shared object) refers to a symbol that's
not defined.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libbfd-in.h (_bfd_stab_section_offset): Declare.
* libbfd.h: Rebuild.
* elf32-i386.c (elf_i386_relocate_section): Adjust the offset of a
stab reloc.
* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
* elf32-mips.c (mips_elf_relocate_section): Likewise.
* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
|
|
|
|
|
|
|
|
|
|
| |
relocations against the text segment, look up the output name of
the reloc section.
* elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
* elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
* elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
* elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
elf64-alpha multiple .got rewrite:
* elf-bfd.h (struct elf_backend_data): Add always_size_sections entry.
(bfd_elf*_mkobject): Don't define here ...
* elfxx-target.h: ... but rather here. Default always_size_sections
hook to NULL.
* elf.c (elf_mkobject): Rename to bfd_elf_mkobject, since that was
what the #defines in elf-bfd.h transmuted it to anyway.
* section.c: Add SEC_LINKER_CREATED flag.
* bfd-in2.h: Rebuild.
* elf32-i386.c (elf_i386_check_relocs): Add SEC_LINKER_CREATED to
relocation section flags.
(elf_i386_size_dynamic_sections): Use SEC_LINKER_CREATED instead of
SEC_IN_MEMORY to recognize generated bits.
* elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_size_dynamic_sections):
Likewise.
* elf32-mips.c (mips_elf_final_link, mips_elf_create_dynamic_sections,
mips_elf_create_compact_rel_section, mips_elf_create_got_section,
mips_elf_check_relocs, mips_elf_size_dynamic_sections): Likewise.
* elf32-ppc.c (ppc_elf_create_linker_section,
ppc_elf_size_dynamic_sections): Likewise.
* elf32-sparc.c (elf32_sparc_check_relocs,
elf32_sparc_size_dynamic_sections): Likewise.
* elflink.c (_bfd_elf_create_got_section): Add SEC_LINKER_CREATED to
section flags.
(_bfd_elf_create_dynamic_sections): Likewise.
(_bfd_elf_make_linker_section_rela): Likewise.
* elflink.h (elf_link_create_dynamic_sections): Likewise.
(bfd_elf,size_dynamic_sections): Call the always_size_sections hook.
(elf_bfd_final_link): Use SEC_LINKER_CREATED instead of SEC_IN_MEMORY
to identify generated bits.
(elf_link_input_bfd): Likewise.
* elf64-alpha.c: Rewrite everything touching relocations.
|
| |
|
|
|
|
|
|
| |
ppc_elf_addr16_ha_reloc.
(ppc_elf_addr16_ha_reloc): New static function.
PR 10036.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
warning symbols correctly.
* elf32-i386.c (elf_i386_relocate_section): Likewise.
* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
* elf32-mips.c (mips_elf_relocate_section): Likewise.
* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
a TOC16 relocation. Begin support R_PPC_SDA{2,}REL relocation.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
(struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
(elf_flags_init): Rename from elf_ppc_flags_init.
* elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
elf_ppc_flags_init.
(ppc_elf_copy_private_bfd_data): Likewise.
(ppc_elf_merge_private_bfd_data): Likewise.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rather than a direct fprintf.
* archive.c (_bfd_write_archive_contents): Likewise.
* coffcode.h (coff_slurp_symbol_table): Likewise.
* elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
(ppc_elf_unsupported_reloc): Likewise.
(ppc_elf_relocate_section): Likewise.
* i386linux.c (linux_tally_symbols): Likewise.
(linux_finish_dynamic_link): Likewise.
* osf-core.c (osf_core_core_file_p): Likewise.
* rs6000-core.c (rs6000coff_get_section_contents): Likewise.
* som.c (som_sizeof_headers): Likewise.
* srec.c (srec_bad_byte): Likewise.
* bfd.c (bfd_assert): Likewise. Also change file to be const.
* libbfd-in.h (bfd_assert): Declare first parameter const.
* libbfd.h: Rebuild.
* coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
bfd_reloc_overflow is enough.
* coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
* coff-h8500.c (rtype2howto): Likewise.
* coff-z8k.c (rtype2howto): Likewise.
* coffcode.h (dummy_reloc16_extra_cases): Likewise.
* elf.c (_bfd_elf_get_lineno): Likewise.
(_bfd_elf_no_info_to_howto): Likewise.
(_bfd_elf_no_info_to_howto_rel): Likewise.
* hp300hpux.c (convert_sym_type): Likewise.
(MY(swap_std_reloc_in)): Likewise.
* elf.c (bfd_section_from_shdr): Remove #if 0 sections.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moved some mostly size-independent stuff from elfcode.h to elf.c, adding a data
structure to elfcode.h with some misc data and callback functions. Added a
pointer to that structure to the target back end data. More work can be done
here.
Renamed generic elf routines (not cpu-specific stuff) to start with bfd_elf or
_bfd_elf. Updated most call sites, sometimes defined some macros.
Moved some dynamic linking support code from m68k, sparc, i386 to common files,
using target back end flags to control behavior. More work can probably be
done here too.
Moved core- and linker-support code out of elfcode.h to elf.c, elfcore.h,
elflink.h, or elflink.c. Now elfcode.h contains only .o and executable
support, plus #includes of elfcore.h and elflink.h. Much of the contents of
these other header files can probably still be moved from the .h files to the
.c files, to get compiled only once.
Cleaned up some "gcc -Wall" warnings regarding unused or uninitialized
variables, in generic and cpu-specific code.
|
|
|