Age | Commit message (Collapse) | Author | Files | Lines |
|
* elflink.c (elf_link_add_object_symbols): Don't set up merge
section data here..
* elf.c (_bfd_elf_merge_sections): .. Do it here instead.
* merge.c: Formatting. Remove unnecessary casts. Expand
bfd_get_section_alignment macro.
(struct sec_merge_sec_info): Rename "first" to "first_str". Update
use throughout file.
(_bfd_add_merge_section): Rename from _bfd_merge_section. Update
comment. Abort on dynamic or non-SEC_MERGE input. Don't test
section name to determine sinfo group, instead test output section
and alignment.
(_bfd_merge_sections): Add struct bfd_link_info param. Call
_bfd_strip_section_from_output rather than just twiddling flags.
* libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
(_bfd_merge_sections): Update prototype.
* libbfd.h: Regenerate.
ld/
* ldlang.c (lang_process): Call bfd_merge_sections later, and
only when not a relocatable link.
(print_input_section): Handle SEC_EXCLUDE sections.
(size_input_section): Don't update dot on SEC_EXCLUDE sections.
(lang_do_assignments_1): Likewise.
* ldwrite.c (build_link_order): Ignore SEC_EXCLUDE input sections.
* emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Likewise.
* emultempl/hppaelf.em (build_section_lists): Likewise.
* emultempl/ppc64elf.em (build_toc_list): Likewise.
(build_section_lists): Likewise.
|
|
|
|
|
|
--reduce-memory-overheads option.
* ld.texinfo: Document --reduce-memory-overheads option.
* ld.h (map_symbol_def): New struct.
(struct user_section_struct, section_userdata_type): Rename to:
(struct lean_user_section_struct, lean_section_userdata_type).
(struct fat_user_section_struct, fat_section_userdata_type): New.
(SECTION_USERDATA_SIZE): Define.
(args_type): New member reduce_memory_overheads.
* ldlang.c (map_obstack): New static variable.
(init_map_userdata, print_all_symbols, sort_def_symbol): New functions.
(lang_map): Unless command_line.reduce_memory_overheads is set,
initialize lists of defined symbols for each section.
(print_input_section): Unless command_line.reduce_memory_overheads
is set, use print_all_symbols.
(init_os): Use lean_section_userdata_type / SECTION_USERDATA_SIZE.
* ldmain.c (main): Initialize command_line.reduce_memory_overheads.
* lexsup.c (enum option_values): Add OPTION_REDUCE_MEMORY_OVERHEADS.
(ld_options): Add entry for --reduce-memory-overheads.
(parse_args): Handle OPTION_REDUCE_MEMORY_OVERHEADS.
|
|
(ONLY_IF_RO, ONLY_IF_RW): New tokens.
(section): Add sect_constraint. Pass additional argument
to lang_enter_output_section_statement.
* mri.c (mri_draw_tree): Pass additional argument to
lang_enter_output_section_statement.
* emultempl/pe.em (place_orphan): Likewise.
(output_prev_sec_find): Disregard output section statements with
constraint == -1.
* emultempl/mmo.em (output_prev_sec_find): Likewise.
(mmo_place_orphan): Pass additional argument to
lang_enter_output_section_statement.
* emultempl/elf32.em (output_prev_sec_find): Disregard output section
statements with constraint == -1.
(place_orphan): Pass additional argument to
lang_enter_output_section_statement.
* ldlang.c (lang_enter_overlay_section): Likewise.
(lang_output_section_find_1): New.
(lang_output_section_find): Use it.
(lang_output_section_statement_lookup_1): New.
(lang_output_section_statement_lookup): Use it.
(check_section_callback, check_input_sections): New.
(map_input_to_output_sections): Check if all input sections
are readonly if ONLY_IF_RO or ONLY_IF_RW was seen.
(strip_excluded_output_sections): Disregard output section statements
with constraint == -1.
(lang_record_phdrs): Likewise.
(lang_enter_output_section_statement): Add constraint argument.
Use lang_output_section_statement_lookup_1.
* ldlang.h (lang_output_section_statement_type): Add constraint
and all_input_readonly fields.
(lang_enter_output_section_statement): Adjust prototype.
* ldlex.l (ONLY_IF_RO, ONLY_IF_RW): New tokens.
* scripttempl/elf.sc (.eh_frame, .gcc_except_table): Move into text
segment if all input sections are readonly.
|
|
|
|
|
|
|
|
|
|
* ld-elf/frame.exp: New file. Test read-only .eh_frame and
.gcc_except_table sections.
* ld-elf/frame.s: Likewise.
* ld-elf/table.s: Likewise.
* ld-elf/tbss.s: Likewise.
|
|
|
|
|
|
and removal of unneeded STT_SECTION symbols from .dynsym.
* ld-sh/tlsbin-3.d: Likewise.
* ld-sh/tlspic-2.d: Likewise.
|
|
* ld-sh/sh64/relfail.exp: Likewise.
* lib/ld-lib.exp: Likewise.
|
|
* elflink.c (elf_bfd_final_link): Don't output STT_SECTION symbol
into .dynsym if elf_section_data (sec)->dynindx <= 0.
Adjust counting of last_local.
(_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
created by the linker nor !SHF_ALLOC.
* elf32-i386.c (elf_i386_finish_dynamic_sections): Point
DT_PLTGOT to the start of the .got.plt section instead of the
.got output section. Set sh_entsize for .got section in addition
to .got.plt.
(elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
is at sgot->output_section->vma.
* elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
DT_PLTGOT to the start of the .got.plt section instead of the
.got output section.
(elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
is at sgot->output_section->vma. Set sh_entsize for .got section
in addition to .got.plt.
* elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
(bfd_section_from_phdr): Likewise.
(map_sections_to_segments): Likewise.
(assign_file_positions_for_segments): Likewise.
(get_program_header_size): Likewise.
* elflink.c (bfd_elf_size_dynamic_sections): Set
elf_tdata (output_bfd)->relro from info->relro.
* elf-bfd.h (struct elf_obj_tdata): Add relro field.
include/
* bfdlink.h (struct bfd_link_info): Add relro, relro_start and
relro_end fields.
* elf/common.h (PT_GNU_EH_FRAME, PT_GNU_STACK): Add comments.
(PT_GNU_RELRO): Define.
binutils/
* readelf.c (get_segment_type): Handle PT_GNU_RELRO.
ld/
* genscripts.sh: Generate -z combreloc -z now -z relro scripts
for binaries, -shared and -pie.
* emulparams/elf_i386.sh (SEPARATE_GOTPLT): Set.
* emulparams/elf_x86_64.sh (SEPARATE_GOTPLT): Set.
* emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Rename to...
(OTHER_RELRO_SECTIONS): ... this.
* ldlex.l (DATA_SEGMENT_RELRO_END): Add.
* emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Handle
-z relro and -z norelro.
(gld${EMULATION_NAME}_list_options): Add it to usage.
(gld${EMULATION_NAME}_get_script): Return -z combreloc -z now
-z relro scripts when appropriate.
* scripttempl/elf.sc: Unset SEPARATE_GOTPLT if RELRO_NOW is set.
Create separate .got.plt section if SEPARATE_GOTPLT.
Move sections which are only written during relocation handling
to the beginning of RW segment. If NO_SMALL_DATA, move .got
before .data. Add DATA_SEGMENT_RELRO_END directive.
Include OTHER_RELRO_SECTIONS.
* ldgram.y (DATA_SEGMENT_RELRO_END): Add.
* ldexp.c (exp_print_token): Handle DATA_SEGMENT_RELRO_END.
(fold_unary): Likewise.
(fold_binary): Handle -z relro.
* ldexp.h (struct exp_data_seg): Add exp_dataseg_relro_seen and
exp_dataseg_relro_adjust phases. Add relro_end field.
* ldmain.c (main): Initialize link_info.relro to FALSE.
* ldlang.c (lang_size_sections): Handle -z relro.
ld/testsuite/
* ld-i386/tlspic.rd: Adjust for section reordering changes
and removal of unneeded STT_SECTION symbols from .dynsym.
* ld-i386/tlspic.dd: Likewise.
* ld-i386/tlspic.sd: Likewise.
* ld-i386/tlsbin.rd: Likewise.
* ld-i386/tlsbinpic.s: Likewise.
* ld-i386/tlsbin.dd: Likewise.
* ld-i386/tlsbin.sd: Likewise.
* ld-i386/tlsnopic.rd: Likewise.
* ld-i386/tlsnopic1.s: Likewise.
* ld-i386/combreloc.d: Likewise.
* ld-i386/tlsnopic.dd: Likewise.
* ld-i386/tlsnopic.sd: Likewise.
* ld-x86-64/tlspic.rd: Likewise.
* ld-x86-64/tlspic.dd: Likewise.
* ld-x86-64/tlsbin.dd: Likewise.
* ld-x86-64/tlspic.sd: Likewise.
* ld-x86-64/tlsbin.sd: Likewise.
* ld-x86-64/tlspic.td: Likewise.
* ld-x86-64/tlsbin.td: Likewise.
* ld-x86-64/tlsbin.rd: Likewise.
* ld-s390/tlspic1.s: Likewise.
* ld-s390/tlsbinpic.s: Likewise.
* ld-s390/tlspic.rd: Likewise.
* ld-s390/tlsbin.rd: Likewise.
* ld-s390/tlspic.dd: Likewise.
* ld-s390/tlsbin.dd: Likewise.
* ld-s390/tlsbin.sd: Likewise.
* ld-s390/tlsbin.td: Likewise.
* ld-s390/tlspic.sd: Likewise.
* ld-s390/tlspic.td: Likewise.
* ld-s390/tlspic1_64.s: Likewise.
* ld-s390/tlsbinpic_64.s: Likewise.
* ld-s390/tlspic_64.rd: Likewise.
* ld-s390/tlsbin_64.rd: Likewise.
* ld-s390/tlspic_64.dd: Likewise.
* ld-s390/tlsbin_64.dd: Likewise.
* ld-s390/tlspic_64.sd: Likewise.
* ld-s390/tlspic_64.td: Likewise.
* ld-s390/tlsbin_64.td: Likewise.
* ld-s390/tlsbin_64.sd: Likewise.
* ld-powerpc/tlsexe32.r: Likewise.
* ld-powerpc/tlsso32.r: Likewise.
* ld-powerpc/tlsso32.d: Likewise.
* ld-powerpc/tlsso32.g: Likewise.
* ld-powerpc/tlsso32.t: Likewise.
* ld-powerpc/tlsexe.r: Likewise.
* ld-powerpc/tlsso.r: Likewise.
* ld-powerpc/tlsso.g: Likewise.
* ld-powerpc/tlsexetoc.r: Likewise.
* ld-powerpc/tlstocso.r: Likewise.
* ld-powerpc/tlstocso.g: Likewise.
* ld-ia64/tlspic.rd: Likewise.
* ld-ia64/tlspic.dd: Likewise.
* ld-ia64/tlspic.sd: Likewise.
* ld-ia64/tlspic.td: Likewise.
* ld-ia64/tlsbin.rd: Likewise.
* ld-ia64/tlsbin.sd: Likewise.
* ld-ia64/tlsbin.td: Likewise.
* ld-elfvsb/elfvsb.exp: XFAIL non-PIC load offset tests on s390x.
* ld-shared/shared.exp: Likewise.
|
|
* ld-mmix/bspec2.d: Update sh_info to decimal.
* ld-mmix/local1.d: Likewise.
* ld-mmix/local3.d: Likewise.
* ld-mmix/local5.d: Likewise.
* ld-mmix/local7.d: Likewise.
|
|
|
|
before printing it with %W.
|
|
(OPTION_LARGE_ADDRESS_AWARE): New define.
(gld${EMULATION_NAME}_add_options): Add --large-address-aware option.
(gld_${EMULATION_NAME}_list_options): Likewise.
(gld${EMULATION_NAME}_handle_option): Likewise.
(gld_${EMULATION_NAME}_after_open): Pass real_flags to PE private data.
* ld.texinfo: Document it.
* NEWS: Mention it.
|
|
|
|
elf32-frvfdpic.
|
|
* ld-frv/fr450-link.d: Match fdpic as well.
|
|
* ld-sh/sh64/crange2.rd: Likewise.
* ld-sh/sh64/crange3.rd: Likewise.
* ld-sh/sh64/crange3-cmpct.rd: Likewise.
* ld-sh/sh64/crange3-media.rd: Likewise.
* ld-sh/sh64/crangerel1.rd: Likewise.
* ld-sh/sh64/crangerel2.rd: Likewise.
|
|
* ld-powerpc/tlsexe32.r: Likewise.
* ld-powerpc/tlsexetoc.r: Likewise.
* ld-powerpc/tlsso.r: Likewise.
* ld-powerpc/tlsso32.r: Likewise.
* ld-powerpc/tlstocso.r: Likewise.
|
|
group sections.
(output_section_callback): Adjust.
* ldlang.h (unique_section_p): Update prototype.
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust.
|
|
dynamic linking.
|
|
|
|
(fill_edata): Correct pointer arithmetic.
|
|
2004-04-24 Chris Demetriou <cgd@broadcom.com>
* elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
(elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
(bfd_elf32_bfd_reloc_type_lookup): Remove cases for
BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
and BFD_RELOC_32_PCREL.
(mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
* elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
(_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
(mips_elf_next_relocation): Move comment about matching HI/LO
relocations to...
(_bfd_mips_elf_relocate_section): Here. Remove handling for
R_MIPS_GNU_REL_HI16.
[ include/elf/ChangeLog ]
2004-04-24 Chris Demetriou <cgd@broadcom.com>
* mips.h (R_MIPS_PC32, R_MIPS_PC64, R_MIPS_GNU_REL_LO16)
(R_MIPS_GNU_REL_HI16): Remove.
(R_MIPS_GNU_REL16_S2): Update comment.
[ ld/testsuite/ChangeLog ]
2004-04-24 Chris Demetriou <cgd@broadcom.com>
* ld-elf/merge.d: XFAIL on all MIPS targets.
|
|
* ld-powerpc/tlsso32.d: Update.
|
|
* ld-mips-elf/reloc-3-r.d: Remove, as part of MIPS -membedded-pic
removal.
* ld-mips-elf/reloc-3-srec.d: Likewise.
* ld-mips-elf/reloc-3.ld: Likewise.
* ld-mips-elf/reloc-3a.s: Likewise.
* ld-mips-elf/reloc-3b.s: Likewise.
* ld-mips-elf/mips-elf.exp: Don't run now-removed tests.
|
|
* elf32-sh.c (sh_elf_plt_sym_val): New function.
(elf_backend_plt_sym_val): Define.
opcodes/
* sh-dis.c (print_insn_sh): Print the value in constant pool
as a symbol if it looks like a symbol.
gas/testsuite/
* gas/sh/pcrel2.d: Update.
* gas/sh/tlsd.d: Update.
* gas/sh/tlsnopic.d: Update.
* gas/sh/tlspic.d: Update.
ld/testsuite/
* ld-sh/tlsbin-1.d: Update
* ld-sh/tlspic-1.d: Update.
|
|
|
|
* ld-i386/tlspic.dd: Updated.
|
|
2004-04-21 Chris Demetriou <cgd@broadcom.com>
* coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
* elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
* bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
(bfd_mips_elf32_create_embedded_relocs): Remove prototypes
* bfd-in2.h: Regenerate.
[ ld/ChangeLog ]
2004-04-21 Chris Demetriou <cgd@broadcom.com>
* ld.texinfo: Remove MIPS --embedded-relocs documentation.
* emulparams/elf32bmip.sh (EXTRA_EM_FILE): Remove definition.
* emulparams/mipsidt.sh (TEMPLATE_NAME): Use generic.em.
(EXTRA_EM_FILE): Use mipsecoff.em
* emulparams/mipsidtl.sh (TEMPLATE_NAME): Use generic.em.
(EXTRA_EM_FILE): Use mipsecoff.em
* emultempl/mipsecoff.em: Restructure to be included as an
extra emulation file.
(check_sections, gld${EMULATION_NAME}_after_open)
(gld${EMULATION_NAME}_after_allocation)
(gld${EMULATION_NAME}_get_script)
(ld_${EMULATION_NAME}_emulation): Remove
(gld${EMULATION_NAME}_before_parse): Rename to...
(mipsecoff_before_parse): This.
(LDEMUL_BEFORE_PARSE): Define.
* emultempl/mipself.em: Remove file.
* scripttempl/mips.sc (.rel.sdata): Do not include in output.
(__runtime_reloc_start, __runtime_reloc_stop): Stop providing
these symbols.
* Makefile.am: Remove dependencies on emultempl/mipself.em.
* Makefile.in: Regenerate.
[ ld/testsuite/ChangeLog ]
2004-04-21 Chris Demetriou <cgd@broadcom.com>
* ld-empic/run.c: Removed as part of MIPS --embedded-relocs removal.
* ld-empic/empic.exp: Likewise.
* ld-empic/relax.t: Likewise.
* ld-empic/relax1.c: Likewise.
* ld-empic/relax2.c: Likewise.
* ld-empic/relax3.c: Likewise.
* ld-empic/relax4.c: Likewise.
* ld-empic/runtest1.c: Likewise.
* ld-empic/runtest2.c: Likewise.
* ld-empic/runtesti.s: Likewise.
* ld-mips-elf/empic1-ln.d: Likewise.
* ld-mips-elf/empic1-lp.d: Likewise.
* ld-mips-elf/empic1-mn.d: Likewise.
* ld-mips-elf/empic1-mp.d: Likewise.
* ld-mips-elf/empic1-ref.s: Likewise.
* ld-mips-elf/empic1-sn.d: Likewise.
* ld-mips-elf/empic1-sp.d: Likewise.
* ld-mips-elf/empic1-space.s: Likewise.
* ld-mips-elf/empic1-tgt.s: Likewise.
* ld-mips-elf/empic2-fwd-0.d: Likewise.
* ld-mips-elf/empic2-fwd-1.d: Likewise.
* ld-mips-elf/empic2-fwd-tgt.s: Likewise.
* ld-mips-elf/empic2-ref.s: Likewise.
* ld-mips-elf/empic2-rev-0.d: Likewise.
* ld-mips-elf/empic2-rev-1.d: Likewise.
* ld-mips-elf/empic2-rev-tgt.s: Likewise.
* ld-mips-elf/empic2-space.s: Likewise.
* ld-mips-elf/emrelocs-eb.d: Likewise.
* ld-mips-elf/emrelocs-el.d: Likewise.
* ld-mips-elf/emrelocs.ld: Likewise.
* ld-mips-elf/emrelocs1.s: Likewise.
* ld-mips-elf/emrelocs2.s: Likewise.
* ld-mips-elf/mips-elf.exp: Don't run now-removed tests.
|
|
|
|
|
|
(.data): Add KEEP for .gnu.linkonce.d.*personality*.
(.gcc_except_table): Add KEEP for self and accept .gcc_except_table.*.
|
|
|
|
2004-04-20 Chris Demetriou <cgd@broadcom.com>
* NEWS: Note that MIPS -membedded-pic option is deprecated.
[ ld/ChangeLog ]
2004-04-20 Chris Demetriou <cgd@broadcom.com>
* NEWS: Note that MIPS --embedded-relocs option is deprecated.
|
|
* ld-elfweak/elfweak.exp: Add an undefined weak size change
test.
* ld-elfweak/size.dat: New file.
* ld-elfweak/size_bar.c: Likewise.
* ld-elfweak/size_foo.c: Likewise.
* ld-elfweak/size_main.c: Likewise.
|
|
with COFF based x86 ports.
|
|
* elf32-sparc.c (elf32_sparc_relocate_section): Handle
relocs against hidden/protected undefweak symbols properly.
* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
gas/testsuite/
* gas/cfi/cfi-sparc64-1.d: Update.
ld/testsuite/
* ld-elfvsb/elfvsb.exp: XFAIL some tests on sparc64.
* ld-shared/shared.exp: Likewise.
|
|
specially.
|
|
with default priority. Likewise for dtors.
|
|
|
|
2004-04-14 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-generic.c: Add some comments.
ld/testsuite/
2004-04-14 H.J. Lu <hongjiu.lu@intel.com>
* ld-scripts/assert.s: Add a newline.
* ld-scripts/data.s: Likewise.
|
|
* config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
* configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
* configure: Regenerate.
/gas/ChangeLog
* Makefile.am: Remove mips from aout targets.
* Makefile.in: Regenerate.
* configure.in: Remove mips-dec-bsd* target.
* configure: Regenerate.
/ld/ChangeLog
* configure.host: Remove mips*-dec-bsd* target.
* configure.tgt: Likewise.
|
|
* emulparams/elf64bmip.sh (EXTRA_EM_FILE): Likewise.
* emulparams/elf32bmipn32.sh (EXTRA_EM_FILE): Likewise.
* emultempl/irix.em: New file.
* Makefile.am (eelf32bsmip.c, eelf32bmipn32.c, eelf64bmip.c): Update
dependencies.
* Makefile.in: Regenerate.
|
|
* ld-cdtest/cdtest.exp: Remove -fgnu-linker.
|