| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add notice_as_needed.
* elf64-ppc.c (elf_backend_as_needed_cleanup): Don't define.
(elf_backend_notice_as_needed): Define.
(ppc64_elf_as_needed_cleanup): Rename and adjust..
(ppc64_elf_notice_as_needed): ..to this.
* elflink.c (_bfd_elf_notice_as_needed): New function, extracted..
(elf_link_add_object_symbols): ..from here.
* elfxx-target.h (elf_backend_as_needed_cleanup): Don't define.
(elf_backend_notice_as_needed): Define..
(elfNN_bed): ..and use here.
|
|
|
|
| |
and *poldalignment before exiting when !relocs_compatible.
|
|
|
|
| |
symbols to STV_HIDDEN.
|
|
|
|
|
|
| |
PR ld/12761
* elflink.c (elf_link_add_object_symbols): Correct test in
last patch. Remove unnecessary code.
|
|
|
|
|
|
| |
PR ld/12761
* elflink.c (elf_link_add_object_symbols): Don't clobber
.gnu.warning.symbol sections when shared.
|
|
|
|
| |
of symbols when hashes already exist.
|
|
|
|
|
|
| |
hashes around loading as-needed library. Zero them on allocation,
and restore to initial all-zero state if library not needed.
Arrange to reuse hashes if we load library again later.
|
|
|
|
|
| |
* elflink.c (elf_link_add_object_symbols): Initialise 'idx' to
zero.
|
|
|
|
| |
STV_INTERNAL symbols STV_HIDDEN.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fragmented .debug_line sections associated with unmarked code
sections.
* dwarf.c (read_debug_line_header): New function. Reads in a
header in a .debug_line section.
(display_debug_lines_raw): Use new function. Handle fragmentary
.debug_line sections.
(display_debug_lines_decoded): Likewise.
* readelf.c (process_section_headers): Handle fragmenatry
.debug_line sections.
(display_debug_section): Likewise.
* as.c (Options): Add -gdwarf-sections.
(parse_args): Likewise.
* as.h (flag_dwarf_sections): Declare.
* dwarf2dbg.c (emit_fixed_inc_line_addr): Skip section changes.
(process_entries): When -gdwarf-sections is enabled generate
fragmentary .debug_line sections.
(out_debug_line): Set the section for the .debug_line section end
symbol.
* doc/as.texinfo: Document -gdwarf-sections.
* NEWS: Mention -gdwarf-sections.
* gas/elf/dwarf2-3.d: Fix expected readelf output.
* scripttempl/DWARF.sc: Add support for .debug_line.* and
.debug_line_end.
|
| |
|
|
|
|
|
|
| |
* elf32-tic6x.c: removing unused variables
* elf32-v850.c: redefine the type of a variable (int -> bfd_vma)
* vms-alpha.c: initialize a variable
|
| |
|
|
|
|
|
| |
* bfd-in2.h: Regenerate.
* elflink.c (elf_link_add_object_symbols): Use new error.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(struct elf_backend_data <elf_backed_reloc_type_class>): Add
bfd_link_info* and asection* params.
(_bfd_elf_reloc_type_class): Likewise.
* elf.c (_bfd_elf_reloc_type_class): Likewise.
* elflink.c (elf_link_sort_cmp2): Sort first on reloc class.
(elf_link_sort_relocs): Update elf_backed_reloc_type_class call.
* elf32-ppc.c (ppc_elf_reloc_type_class): Return reloc_class_ifunc
for any reliplt reloc. Don't return reloc_class_plt for
R_PPC_REL24 and R_PPC_ADDR24.
* elf64-ppc.c (allocate_got): Formatting.
(ppc64_elf_reloc_type_class): Return reloc_class_ifunc for any
reliplt reloc.
* elf-m10300.c, * elf32-arm.c, * elf32-bfin.c, * elf32-cr16.c,
* elf32-cris.c, * elf32-hppa.c, * elf32-i386.c, * elf32-lm32.c,
* elf32-m32r.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c,
* elf32-s390.c, * elf32-sh.c, * elf32-sparc.c, * elf32-tilepro.c,
* elf32-vax.c, * elf32-xtensa.c, * elf64-aarch64.c, * elf64-alpha.c,
* elf64-hppa.c, * elf64-ia64-vms.c, * elf64-s390.c, * elf64-sparc.c,
* elf64-x86-64.c, * elfnn-ia64.c, * elfxx-tilegx.c, * elfxx-tilegx.h:
Add extra params to the various reloc_type_class functions.
|
|
|
|
| |
over _bfd_elf_merge_symbol calls.
|
|
|
|
| |
common override alignment check code. Formatting.
|
|
|
|
|
|
|
|
|
|
|
| |
usual common symbols as well as for dynamic. Add poldbfd param.
Save old bfd. Adjust callers.
(_bfd_elf_add_default_symbol): Add poldbfd param. Pass "section"
and "value" by value, not pointer. Adjust caller.
(elf_link_add_object_symbols): Combine undef_bfd and old_bfd vars.
Delete code to set same. Use old_bfd and old_alignment from
_bfd_elf_merge_symbol instead. Add default symbol before
alignment and size checks. Wrap overlong lines.
|
|
|
|
|
| |
(elf_link_add_object_symbols): Don't call _bfd_elf_add_default_symbol
when override is true.
|
|
|
|
| |
of *sym_hash.
|
|
|
|
|
|
| |
Wrap long lines.
(elf_link_add_object_symbols): Discard TLS symbols for --just-syms
early in symbol loop.
|
|
|
|
|
|
|
|
| |
(_bfd_elf_init_reloc_shdr): Delete.
* elf.c (_bfd_elf_init_reloc_shdr): Make static.
* elf64-x86-64.c (elf_x86_64_merge_symbol): Trim parameters to
just what is needed.
* elflink.c (_bfd_elf_merge_symbol): Update bed->merge_symbol call.
|
|
|
|
|
|
| |
* elflink.c (_bfd_elf_merge_symbol): Make static.
* elf32-sh-symbian.c (sh_symbian_relocate_section): Don't call
_bfd_elf_merge_symbol, call _bfd_generic_link_add_one_symbol.
|
|
|
|
|
|
|
|
| |
* elflink.c (elf_link_add_object_symbols): Don't set def_regular
or ref_regular for BFD_PLUGIN owned syms, or have them affect
def_dynamic/ref_dynamic.
(_bfd_elf_fix_symbol_flags): Don't set def_regular for BFD_PLUGIN
owned syms.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
@(disp:32,ERx) to mov @(disp:16,ERx).
(R_H8_DISP32A16): New reloc.
Comments added and corrected.
* reloc.c (BFD_RELOC_H8_DISP32A16): New reloc.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
* ld.texinfo (H8/300): Add description of relaxation of
mov @(disp:32,ERx) to mov @(disp:16,ERx).
* ld-h8300/h8300.exp: Add new relax-7 test on ELF.
* ld-h8300/relax-2.s: Add other direction and .w/.l variants of
mov insns.
* ld-h8300/relax-2.d: Update expected disassembly.
* ld-h8300/relax-7a.s: New: tests for mov @(disp:32,ERx) -> mov
@(disp:16,ERx).
* ld-h8300/relax-7b.s: New: Likewise.
* ld-h8300/relax-7.d: New: expected disassembly.
* config/tc-h8300.c (do_a_fix_imm): Add relaxation of mov
@(disp:32,ERx) to mov @(disp:16,ERx) insns by new reloc
R_H8_DISP32A16.
* config/tc-h8300.h: Remove duplicated defines.
|
|
|
|
|
|
|
|
| |
* elflink.c (_bfd_elf_make_dynamic_reloc_section): Override
sh_type according to is_rela.
ld/testsuite/
* ld-elf/rel.c, ld-elf/relmain.c, ld-elf/relmain.out: New test.
* ld-elf/shared.exp: Build and run it.
|
|
|
|
|
|
|
|
|
|
| |
bfd/
* elflink.c (elf_link_add_object_symbols): Exclude weak refs when
considering whether an --as-needed library is needed.
ld/
* ld.texinfo (--as-needed): Update.
ld/testsuite/
* ld-elf/pr14862.out: Expect no output.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bfd/
PR ld/15167
* elf64-ia64-vms.c (elf64_vms_link_add_object_symbols): Set
unique_global only for definition.
* elflink.c (_bfd_elf_merge_symbol): Don't set unique_global
here.
(elf_link_add_object_symbols): Set unique_global only
for definition.
ld/testsuite/
PR ld/15167
* ld-unique/unique.exp: Add a test for shared library with
reference.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* elf-bfd.h (struct elf_obj_tdata): Rename segment_map to seg_map.
Delete num_locals and num_globals.
(elf_num_locals, elf_num_globals): Don't define.
(elf_seg_map, elf_next_file_pos, elf_eh_frame_hdr, elf_linker,
elf_stack_flags, elf_strtab_sec, elf_shstrtab_sec): Define.
* bfd.c, * elf-eh-frame.c, * elf-nacl.c, * elf-vxworks.c, * elf.c,
* elf32-arm.c, * elf32-lm32.c, * elf32-ppc.c, * elf32-rx.c,
* elf32-spu.c, * elf64-hppa.c, * elfcode.h, * elflink.c,
* elfnn-ia64.c, * elfxx-mips.c: Use newly defined elf_obj_tdata
accessor macros.
* elf.c (elf_map_symbols): Add pnum_locals param. Return
number of locals syms via new param.
(swap_out_syms): Adjust to suit elf_map_symbols change.
ld/
* emultempl/elf-generic.em: Use newly defined elf_obj_tdata
accessor macros.
|
|
|
|
|
|
|
|
|
|
| |
* elf-bfd.h (_bfd_elf_strtab_clear_refs): Delete.
(_bfd_elf_strtab_clear_all_refs): Declare.
(_bfd_elf_strtab_resize): Declare.
* elf-strtab.c (_bfd_elf_strtab_clear_refs): Delete.
(_bfd_elf_strtab_clear_all_refs): New function.
(_bfd_elf_strtab_resize): Likewise.
* elflink.c (elf_link_add_object_symbols): Use _bfd_elf_strtab_resize.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bfd/
PR ld/15146
* elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
for references from the dummy bfd.
ld/
PR ld/15146
* plugin.c (plugin_notice): Replace the undefined dummy bfd with
the real one.
ld/testsuite/
PR ld/15146
* ld-plugin/pr15146.d: New file.
* ld-plugin/pr15146a.c: Likewise.
* ld-plugin/pr15146b.c: Likewise.
* ld-plugin/pr15146c.c: Likewise.
* ld-plugin/pr15146d.c: Likewise.
* ld-plugin/lto.exp: Add tests for PR ld/15146.
|
|
|
|
|
|
| |
PR ld/15149
* elflink.c (elf_link_add_object_symbols): Also track weak
references.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* elf-bfd.h (_bfd_elf_link_hash_table_free): Declare.
* elflink.c (_bfd_elf_link_hash_table_free): New function.
(elf_final_link_free): New function, extracted from..
(bfd_elf_final_link): ..here. Always call
_bfd_elf_write_section_eh_frame_hdr.
* elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Default to
_bfd_elf_link_hash_table_free.
* libbfd-in.h (_bfd_merge_sections_free): Declare.
* libbfd.h: Regenerate.
* merge.c (_bfd_merge_sections_free): New function.
* elf-eh-frame.c (_bfd_elf_write_section_eh_frame_hdr): Free
hdr_info->array.
* elf-m10300.c (elf32_mn10300_link_hash_table_free): Call
_bfd_elf_link_hash_table_free.
* elf32-arm.c (elf32_arm_link_hash_table_free): Likewise.
* elf32-avr.c (elf32_avr_link_hash_table_free): Likewise.
* elf32-hppa.c (elf32_hppa_link_hash_table_free): Likewise.
* elf32-i386.c (elf_i386_link_hash_table_free): Likewise.
* elf32-m68hc1x.c (m68hc11_elf_hash_table_free): Likewise.
* elf32-m68k.c (elf_m68k_link_hash_table_free): Likewise.
* elf32-metag.c (elf_metag_link_hash_table_free): Likewise.
* elf32-xgate.c (xgate_elf_bfd_link_hash_table_free): Likewise.
* elf64-aarch64.c (elf64_aarch64_link_hash_table_free): Likewise.
* elf64-ia64-vms.c (elf64_ia64_hash_table_free): Likewise.
* elf64-ppc.c (ppc64_elf_link_hash_table_free): Likewise.
* elf64-x86-64.c (elf_x86_64_link_hash_table_free): Likewise.
* elfnn-ia64.c (elfNN_ia64_hash_table_free): Likewise.
* elf32-cr16.c (elf32_cr16_link_hash_table_free): Delete.
(bfd_elf32_bfd_link_hash_table_free): Don't define.
* elf32-tic6x.c (elf32_tic6x_link_hash_table_free): Delete.
(bfd_elf32_bfd_link_hash_table_free): Dont' define.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
* m68klinux.c (linux_link_hash_table_create): Likewise.
* sparclinux.c (linux_link_hash_table_create): Likewise.
* sunos.c (sunos_link_hash_table_create): Likewise.
* xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
* elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
* elf32-arm.c (elf32_arm_link_hash_table_create): Likewise.
* elf32-avr.c (elf32_avr_link_hash_table_create): Likewise.
* elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
* elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
* elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
* elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
* elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
* elf32-m32r.c (m32r_elf_link_hash_table_create): Likewise.
* elf32-m68hc1x.c (m68hc11_elf_hash_table_create): Likewise.
* elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
* elf32-metag.c (elf_metag_link_hash_table_create): Likewise.
* elf32-nios2.c (nios2_elf32_link_hash_table_create): Likewise.
* elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
* elf32-score.c (elf32_score_link_hash_table_create): Likewise.
* elf32-spu.c (spu_elf_link_hash_table_create): Likewise.
* elf32-tic6x.c (elf32_tic6x_link_hash_table_create): Likewise.
* elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
* elf32-xgate.c (xgate_elf_bfd_link_hash_table_create): Likewise.
* elf32-xtensa.c (elf_xtensa_link_hash_table_create): Likewise.
* elf64-aarch64.c (elf64_aarch64_link_hash_table_create): Likewise.
* elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
* elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
* elf64-x86-64.c (elf_x86_64_link_hash_table_create): Likewise.
* elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
* elflink.c (_bfd_elf_link_hash_table_create): Likewise.
(_bfd_elf_link_hash_table_init): Assume zero fill table on entry.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bfd/
PR ld/15107
* elflink.c (elf_link_output_extsym): Set STB_GNU_UNIQUE only if
symbol is defined in regular object.
ld/testsuite/
PR ld/15107
* ld-unique/unique_empty.s: Add reference to "b".
|
|
|
|
|
|
|
| |
The "new" dtags options have been around for 14+ years, so there
shouldn't be a need to generate both new & old tags anymore.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Add ref_dynamic_nonweak.
* elflink.c (_bfd_elf_mark_dynamic_def_weak): Delete.
(_bfd_elf_merge_symbol): Don't call above function. Move
setting of ref_dynamic_nonweak and dynamic_def earlier. Don't
clear dynamic_def.
(elf_link_add_object_symbols): Delete redundant "override" test.
Don't set dynamic_def here.
(elf_link_output_extsym): Update.
|
|
|
|
|
| |
* elf-strtab.c (_bfd_elf_strtab_refcount): New function.
* elflink.c (elf_add_dt_needed_tag): Use _bfd_elf_strtab_refcount.
|
|
|
|
|
|
|
|
|
| |
* elf-bfd.h (_bfd_elf_strtab_clear_refs): Declare.
(_bfd_elf_strtab_clear_all_refs): Define.
* elf-strtab.c (_bfd_elf_strtab_clear_refs): New function.
(_bfd_elf_strtab_clear_all_refs): Delete.
* elflink.c (elf_link_add_object_symbols): Clear out added
strtab refs. Correct handling of warning common symbols.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* aout0.c: Remove trailing white spaces.
* archive.c: Likewise.
* archures.c: Likewise.
* bfd-in.h: Likewise.
* bfd-in2.h: Likewise.
* coff-alpha.c: Likewise.
* coff-i860.c: Likewise.
* coff-mips.c: Likewise.
* coff-ppc.c: Likewise.
* coff-tic80.c: Likewise.
* coff-x86_64.c: Likewise.
* coff-z80.c: Likewise.
* coffcode.h: Likewise.
* coffgen.c: Likewise.
* cofflink.c: Likewise.
* compress.c: Likewise.
* corefile.c: Likewise.
* cpu-arm.c: Likewise.
* cpu-avr.c: Likewise.
* cpu-bfin.c: Likewise.
* cpu-cr16.c: Likewise.
* cpu-cr16c.c: Likewise.
* cpu-crx.c: Likewise.
* cpu-h8300.c: Likewise.
* cpu-i386.c: Likewise.
* cpu-lm32.c: Likewise.
* cpu-m68k.c: Likewise.
* cpu-moxie.c: Likewise.
* cpu-msp430.c: Likewise.
* cpu-sh.c: Likewise.
* cpu-xc16x.c: Likewise.
* dwarf2.c: Likewise.
* ecofflink.c: Likewise.
* ecoffswap.h: Likewise.
* elf-ifunc.c: Likewise.
* elf-m10300.c: Likewise.
* elf-vxworks.c: Likewise.
* elf32-avr.c: Likewise.
* elf32-avr.h: Likewise.
* elf32-cr16.c: Likewise.
* elf32-cr16c.c: Likewise.
* elf32-cris.c: Likewise.
* elf32-crx.c: Likewise.
* elf32-frv.c: Likewise.
* elf32-hppa.c: Likewise.
* elf32-i860.c: Likewise.
* elf32-ip2k.c: Likewise.
* elf32-iq2000.c: Likewise.
* elf32-m32c.c: Likewise.
* elf32-m68hc1x.c: Likewise.
* elf32-msp430.c: Likewise.
* elf32-mt.c: Likewise.
* elf32-ppc.c: Likewise.
* elf32-rl78.c: Likewise.
* elf32-s390.c: Likewise.
* elf32-score.h: Likewise.
* elf32-sh-symbian.c: Likewise.
* elf32-sh.c: Likewise.
* elf32-spu.c: Likewise.
* elf32-tic6x.c: Likewise.
* elf32-v850.c: Likewise.
* elf32-xc16x.c: Likewise.
* elf32-xtensa.c: Likewise.
* elf64-alpha.c: Likewise.
* elf64-hppa.c: Likewise.
* elf64-ppc.c: Likewise.
* elf64-s390.c: Likewise.
* elfcore.h: Likewise.
* elflink.c: Likewise.
* elfxx-mips.c: Likewise.
* elfxx-sparc.c: Likewise.
* elfxx-tilegx.c: Likewise.
* ieee.c: Likewise.
* libcoff.h: Likewise.
* libpei.h: Likewise.
* libxcoff.h: Likewise.
* linker.c: Likewise.
* mach-o-i386.c: Likewise.
* mach-o-target.c: Likewise.
* mach-o.c: Likewise.
* mach-o.h: Likewise.
* mmo.c: Likewise.
* opncls.c: Likewise.
* pdp11.c: Likewise.
* pe-x86_64.c: Likewise.
* peXXigen.c: Likewise.
* pef-traceback.h: Likewise.
* pei-x86_64.c: Likewise.
* peicode.h: Likewise.
* plugin.c: Likewise.
* reloc.c: Likewise.
* riscix.c: Likewise.
* section.c: Likewise.
* som.c: Likewise.
* syms.c: Likewise.
* tekhex.c: Likewise.
* ticoff.h: Likewise.
* vaxbsd.c: Likewise.
* xcofflink.c: Likewise.
* xtensa-isa.c: Likewise.
|
|
|
|
| |
operation. Add sanity checks.
|
|
|
|
|
|
|
|
|
| |
* elf32-i386.c (elf_i386_relocate_section): Replace
bfd_elf32_swap_reloc_out with elf_append_rel.
(elf_i386_finish_dynamic_symbol): Likewise.
* elflink.c (elf_append_rel): Call swap_reloc_out instead of
swap_reloca_out.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bfd/
2012-11-20 H.J. Lu <hongjiu.lu@intel.com>
PR ld/14862
* elf-bfd.h (elf_link_hash_entry): Remove ref_dynamic_nonweak
added by accident.
(elf_link_add_object_symbols): Don't set nor check
ref_dynamic_nonweak.
ld/testsuite/
2012-11-20 H.J. Lu <hongjiu.lu@intel.com>
PR ld/14862
* ld-elf/shared.exp (build_tests): Build libpr14862-1.o and
libpr14862.so.
(run_tests): Test pr14862.
* ld-elf/pr14862-1.c: New file.
* ld-elf/pr14862-2.c: Likewise.
* ld-elf/pr14862.map: Likewise.
* ld-elf/pr14862.out: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* elf32-arm.c (elf32_arm_print_private_bfd_data): Recognise and
display the new ARM hard-float/soft-float ABI flags for EABI_VER5
(elf32_arm_post_process_headers): Add the hard-float/soft-float
ABI flag as appropriate for ET_DYN/ET_EXEC in EABI_VER5.
binutils:
* readelf.c (decode_ARM_machine_flags): Recognise and display the
new ARM hard-float/soft-float ABI flags for EABI_VER5. Split out
the code for EABI_VER4 and EABI_VER5 to allow this.
elfcpp:
* arm.h: New enum for EABI soft- and hard-float flags.
gold:
* gold.cc (Target_arm::do_adjust_elf_header): Add the
hard-float/soft-float ABI flag as appropriate for ET_DYN/ET_EXEC
in EABI_VER5.
include:
* elf/arm.h (EF_ARM_ABI_FLOAT_SOFT): New define.
(EF_ARM_ABI_FLOAT_HARD): Likewise.
ld/testsuite:
* ld-arm/eabi-hard-float.s: New test source.
* ld-arm/eabi-soft-float.s: New test source.
* ld-arm/eabi-hard-float.d: New test.
* ld-arm/eabi-soft-float.d: New test.
* ld-arm/eabi-soft-float-ABI4.d: New test.
* ld-arm/eabi-soft-float-r.d: New test.
* ld-arm/arm-elf.xp: Use the new tests.
binutils:
PR binutils/14779
* configure.in: Add checks for wchar.h and mbstate_t.
* config.in: Regenerate.
* configure: Regenerate.
* readelf.c: Conditionally include wchar.h.
(print_symbol): Conditionally use mbstate_t.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bfd-in.h (bfd_elf_stack_segment_size): Declare.
* bfd-in2.h: Rebuilt.
* elfxx-target.h (elf_backend_stack_align): New.
(elfNN_bed): Add it.
* elf-bfd.h (struct elf_backend_data): Add stack_align field.
* elf.c (bfd_elf_map_sections_to_segments): Pay attention to
stack_align and stacksize for PT_GNU_STACK segment.
(assign_file_positions_for_non_load_sections): Set p_memsz for
PT_GNU_STACK segment.
(copy_elf_program_header): Copy PT_GNU_STACK size.
* elflink.c (bfd_elf_stack_segment_size): New function, taken from
uclinux backends.
(bfd_elf_size_dynamic_sections): Determine
PT_GNU_STACK requirements after calling backend. Pay attention to
stacksize.
* elf32-bfin.c (elf32_bfinfdpic_always_size_sections): Call
bfd_elf_stack_segment_size.
(elf32_bfinfdpic_modify_program_headers): Delete.
(elf32_bfingfdpic_copy_private_bfd_data): Don't copy PT_GNU_STACK
here.
(elf_backend_stack_align): Override.
(elf_backend_modify_program_headers): Don't override.
* elf32-frv.c (frvfdpic_always_size_sections): Call
bfd_elf_stack_segment_size.
(elf32_frvfdpic_modify_program_headers): Delete.
(elf32_frvfdpic_copy_private_bfd_data): Don't copy PT_GNU_STACK
here.
(elf_backend_stack_align): Override.
(elf_backend_modify_program_headers): Don't override.
* elf32-lm32.c (lm32_elf_always_size_sections): Leave
PT_GNU_STACK creation to underlying elf support. Check
__stacksize here for backwards compatibility, and set it if
needed.
(lm32_elf_modify_segment_map): Delete.
(lm32_elf_modify_program_headers): Delete.
(elf_backend_stack_align): Override.
(elf_backend_modify_segment_map): Don't override.
(elf_backend_modify_program_headers): Don't override.
* elf32-sh.c (sh_elf_always_size_sections): Call
bfd_elf_stack_segment_size.
(sh_elf_modify_program_headers): Delete.
(sh_elf_copy_private_data): Don't copy PT_GNU_STACK
here.
(elf_backend_stack_align): Override.
(elf_backend_modify_program_headers): Don't override.
* elf32-tic6x.c (elf32_tic6x_always_size_sections): Call
bfd_elf_stack_segment_size.
(elf32_tic6x_modify_program_headers): Delete.
(elf32_tic6x_copy_private_data): Delete.
(elf_backend_stack_align): Override.
(bfd_elf32_bfd_copy_private_bfd_data): Don't override.
(elf_backend_modify_program_headers): Don't override.
include/
* bfdlink.h (struct bfd_link_info): Add stacksize option.
ld/
* ld.texinfo (stack-size): New option.
* emultempl/elf32.em: Add stack-size option.
ld/testsuite/
* ld-elf/binutils.exp: Add -z stack-size=0.
* ld-elf/elf.exp: Add stack-exec and stack-size tests.
* ld-elf/orphan-region.d: Add stack-size option. Remove xfail.
* ld-elf/stack-exec.rd: New.
* ld-elf/stack-size.rd: New.
* ld-elf/stack.s: New.
* ld-scripts/empty-aligned.d: Add stack-size option.
* ld-sh/fdpic-stack-set.d: New.
* ld-tic6x/shlib-1.rd: Remove __stacksize symbol.
* ld-tic6x/shlib-1b.rd: Likewise.
* ld-tic6x/shlib-1r.rd: Likewise.
* ld-tic6x/shlib-1rb.rd: Likewise.
* ld-tic6x/shlib-app-1.rd: Likewise.
* ld-tic6x/shlib-app-1b.rd: Likewise.
* ld-tic6x/shlib-app-1r.rd: Likewise.
* ld-tic6x/shlib-app-1rb.rd: Likewise.
* ld-tic6x/shlib-noindex.rd: Likewise.
* ld-tic6x/static-app-1.rd: Likewise.
* ld-tic6x/static-app-1b.rd: Likewise.
* ld-tic6x/static-app-1r.rd: Likewise.
* ld-tic6x/static-app-1rb.rd: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bfd/
PR ld/14591
* elf-bfd.h (_bfd_elf_merge_symbol): Add an argument to return
if the old symbol is weak.
* elf32-sh-symbian.c (sh_symbian_relocate_section): Update
_bfd_elf_merge_symbol call.
* elflink.c (_bfd_elf_merge_symbol): Add an argument to return
if the old symbol is weak.
(_bfd_elf_add_default_symbol): Update _bfd_elf_merge_symbol
call.
(elf_link_add_object_symbols): Don't update symbol type from a
weak definition. Update symbol type from a common symbol when
overriding a weak symbol.
ld/testsuite/
PR ld/14591
* ld-elf/comm-data.exp (run_ld_link_tests): Add comm-data3a and
comm-data3b tests.
* ld-ifunc/ifunc.exp (run_ld_link_exec_tests): New.
* ld-elf/comm-data3.sd: New file.
* ld-elf/comm-data3a.s: Likewise.
* ld-elf/comm-data3b.s: Likewise.
* ld-ifunc/ifunc-17a-i386.d: Likewise.
* ld-ifunc/ifunc-17a-x86-64.d: Likewise.
* ld-ifunc/ifunc-17a.s: Likewise.
* ld-ifunc/ifunc-17b-i386.d: Likewise.
* ld-ifunc/ifunc-17b-x86-64.d: Likewise.
* ld-ifunc/ifunc-17b.s: Likewise.
* ld-ifunc/ifunc-common-1.out: Likewise.
* ld-ifunc/ifunc-common-1a.c: Likewise.
* ld-ifunc/ifunc-common-1b.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* elf-bfd.h (elf_link_hash_table): Add hdynamic for the
_DYNAMIC symbol.
* elflink.c (_bfd_elf_link_create_dynamic_sections): Set
hdynamic.
* elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Check
hdynamic instead of "_DYNAMIC".
* elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise.
* elf32-cr16.c (elf32_arm_finish_dynamic_symbol): Likewise.
* elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
* elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
* elf32-i386.c (elf_i386_convert_mov_to_lea): Likewise.
* elf32-lm32.c (lm32_elf_finish_dynamic_symbol): Likewise.
* elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
* elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
* elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise.
* elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
* elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
* elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise.
* elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise.
* elf64-aarch64.c elf64_aarch64_finish_dynamic_symbol(): Likewise.
* elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise.
* elf64-ia64-vms.c (elf64_ia64_finish_dynamic_symbol): Likewise.
* elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
* elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise.
* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
* elfnn-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise.
* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
* elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
* elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
* elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Check
hdynamic, hgot, hplt instead of _DYNAMIC, _GLOBAL_OFFSET_TABLE_,
_PROCEDURE_LINKAGE_TABLE_.
* elf32-score.c (s3_bfd_score_elf_finish_dynamic_symbol): Likewise.
* elf32-score7.c (s7_bfd_score_elf_finish_dynamic_symbol): Likewise.
|
|
|
|
|
| |
a dynamic symbol defaulted to if preempted with a hidden or
internal definition.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* elflink.c (bfd_elf_record_link_assignment): Remove --defsym
symbols special case.
ld/
* ldexp.h (etree_union): Add defsym member to the assign member
structure.
(exp_assign): Add hidden argument to prototype.
* ldexp.c (exp_fold_tree_1): Use the defsym member to handle
--defsym symbols.
(exp_assop): Add defsym argument, initialize the defsym member
of the assign structure.
(exp_assign): Handle hidden symbols.
(exp_defsym): Update to use the defsym argument to exp_assop.
(exp_provide): Update to handle the defsym argument to exp_assop.
* ldlex.l (HIDDEN): New token.
* ldgram.y (HIDDEN): Likewise.
(assignment, section): Update calls to exp_assign.
* ldctor.c (ldctor_build_sets): Likewise.
* mri.c (mri_format): Likewise.
* ldlang.c (lang_insert_orphan, lang_leave_overlay): Likewise.
(open_input_bfds): Remove --defsym symbols special case.
* emultempl/beos.em (gld_${EMULATION_NAME}_set_symbols): Update
call to exp_assign.
* emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): Likewise.
* emultempl/pep.em (gld_${EMULATION_NAME}_set_symbols): Likewise.
* emultempl/spuelf.em (spu_place_special_section): Likewise.
* emultempl/xtensaelf.em (ld_xtensa_insert_page_offsets):
Likewise.
* ld.texinfo (Assigning Values to Symbols): Add HIDDEN.
(HIDDEN): New subsection.
|
|
|
|
|
|
| |
* elflink.c (elf_sort_symbol): Sort by size too.
(elf_link_add_object_symbols <weakdefs>): Simplify binary search.
Do not depend on ordering of symbol aliases. Match largest size.
|