aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl
AgeCommit message (Collapse)AuthorFilesLines
2003-12-03(HEAP_SECTION_MSP430): New section for forthcoming devices.Nick Clifton1-1/+24
(_etext): provide this defenition for all scripts.
2003-11-10Add initial support for TLS sections in PE format files.Nick Clifton1-0/+9
2003-10-27 * scripttempl/elfm68hc12.sc: Define eeprom memory region.Stephane Carrez1-0/+1
2003-10-19 * Makefile.am: Remove old (before GCC 3.3) emulations for AVRMarek Michalkiewicz1-151/+0
target: avr1200, avr23xx, avr4433, avr44x4, avr85xx, avrmega103, avrmega161, avrmega603. Default to avr2. * Makefile.in: Regenerate. * configure.tgt: Likewise. * emulparams/avr1200.sh: Remove. * emulparams/avr23xx.sh: Remove. * emulparams/avr4433.sh: Remove. * emulparams/avr44x4.sh: Remove. * emulparams/avr85xx.sh: Remove. * emulparams/avrmega103.sh: Remove. * emulparams/avrmega161.sh: Remove. * emulparams/avrmega603.sh: Remove. * scripttempl/elf32avr.sc: Remove.
2003-10-18 * emultempl/mmix-elfnmmo.em (mmix_before_allocation): Force linkerHans-Peter Nilsson1-1/+1
relaxation always; don't exclude relocatable linking. Adjust for _bfd_mmix_prepare_linker_allocated_gregs renamed to _bfd_mmix_before_linker_allocation. (mmix_after_allocation): Adjust for _bfd_mmix_finalize_linker_allocated_gregs renamed to _bfd_mmix_after_linker_allocation. * scripttempl/mmo.sc: Use ADDR (.text), not . - SIZEOF (.text).
2003-10-102003-10-09 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu1-1/+1
* scripttempl/elf.sc (__executable_start): Provide.
2003-08-062003-08-04 Christian Groessler <chris@groessler.org>Jason Eckhardt1-0/+42
Jason Eckhardt <jle@rice.edu> * configure.tgt: Recognize new target i860-*-coff. * Makefile.am (ALL_EMULATIONS): Add ecoff_i860.o. (ecoff_i860.c): New rule. * emulparams/coff_i860.sh: New file. * scripttempl/i860coff.sc: New file. * Makefile.in: Regenerate.
2003-07-29 * scripttempl/elfm68hc12.sc: Add gcc_except_table.Stephane Carrez2-0/+10
* scripttempl/elfm68hc11.sc: Likewise.
2003-07-23 * scripttempl/elfm68hc11.sc: Keep ctor/dtor sections; Take intoStephane Carrez2-30/+8
account .tramp sections; * scripttempl/elfm68hc12.sc: Likewise.
2003-07-10 * emulparams/elf64ppc.sh (OTHER_GOT_SECTIONS): Don't define.Alan Modra1-1/+2
(GOT): Define. * emultempl/ppc64elf.em (stub_added): New static var. (ppc_create_output_section_statements): Call ppc64_elf_init_stub_bfd. (ppc_add_stub_section): Set stub_added. (gld${EMULATION_NAME}_finish): Look for .got rather than .toc. Adjust ppc64_elf_size_stubs call and test for stubs. * scripttempl/elf.sc (GOT): Define and use.
2003-07-04bfd/Jakub Jelinek1-3/+4
* elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec. (elfNN_ia64_dynamic_symbol_p): Change info->shared into !info->executable. (get_fptr): For -pie create .opd as writable section and create .rela.opd as well. (elfNN_ia64_check_relocs): Change info->shared into !info->executable. (allocate_fptr): Likewise. (allocate_dynrel_entries): Account for a relative reloc for -pie @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr for undefweak symbol. Account for an IPLT reloc in .rela.opd section if -pie. (set_got_entry): Don't create a relative reloc if -pie want_ltoff_fptr for undefweak symbol. (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie. (elfNN_ia64_relocate_section): Emit a relative reloc for -pie @fptr(). * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol even if -pie. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. ld/ * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Don't include .opd if -pie. (OTHER_READWRITE_SECTIONS): Include .opd if -pie. * scripttempl/elf.sc: Use SHLIB_DATA_ADDR instead of DATA_ADDR if -pie.
2003-06-10 * scripttempl/h8300sxn.sc: New file.Richard Sandiford1-0/+87
2003-06-03binutils/Jakub Jelinek1-0/+2
* readelf.c (get_segment_type): Handle PT_GNU_STACK. bfd/ * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK. (bfd_section_from_phdr): Likewise. (map_sections_to_segments): Create PT_GNU_STACK segment header. (get_program_header_size): Count with PT_GNU_STACK. * elf-bfd.h (struct elf_obj_tdata): Add stack_flags. * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags. include/ * bfdlink.h (struct bfd_link_info): Add execstack and noexecstack. * elf/common.h (PT_GNU_STACK): Define. ld/ * ldgram.y (phdr_type): Grok PT_GNU_STACK. * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Add -z execstack and -z noexecstack. (gld${EMULATION_NAME}_list_options): Likewise. * scripttempl/elf.sc: If not -r, discard .note.GNU-stack section.
2003-06-032003-06-03 Michael Snyder <msnyder@redhat.com>Michael Snyder1-0/+97
and Bernd Schmidt <bernds@redhat.com> and Alexandre Oliva <aoliva@redhat.com> * Makefile.am: Add new emulations for h8300sx. * Makefile.in: Regenerate. * configure.tgt: Add new emulations. * emulparams/h8300sx.sh: New emulation. * emulparams/h8300sxelf.sh: Ditto. * scripttempl/h8300sx.sc: Ditto.
2003-05-30bfd/Jakub Jelinek1-1/+2
* elflink.h (elf_link_add_object_symbols): Use !info->executable instead of info->shared where appropriate. (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise. * elflink.c (_bfd_elf_create_got_section): Likewise. (_bfd_elf_link_create_dynamic_sections): Likewise. (_bfd_elf_link_assign_sym_version): Likewise. * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section and DT_DEBUG dynamic tag even for position independent executables. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise. * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise. * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise. * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise. * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise. * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise. * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise. * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise. include/ * bfdlink.h (struct bfd_link_info): Add pie and executable bits. ld/ * lexsup.c (OPTION_PIE): Define. (ld_options): Add -pie and --pic-executable options. (parse_args): Handle OPTION_PIE. * ldmain.c (main): Initialize link_info.pie and link_info.executable. * genscripts.sh: Generate PIE scripts. * ld.texinfo: Document -pie and --pic-executable options. * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): (gld${EMULATION_NAME}_place_orphan): Likewise. (gld${EMULATION_NAME}_get_script): Include PIE scripts. * scripttempl/elf.sc: In PIE scripts set . the same way as in shared scripts. * emulparams/elf_i386.sh (GENERATE_PIE_SCRIPT): Set to yes. * emulparams/elf64_ia64.sh (GENERATE_PIE_SCRIPT): Likewise. * emulparams/elf32ppc.sh (GENERATE_PIE_SCRIPT): Likewise. * emulparams/elf64ppc.sh (GENERATE_PIE_SCRIPT): Likewise. * emulparams/elf_x86_64.sh (GENERATE_PIE_SCRIPT): Likewise. * emulparams/elf_s390.sh (GENERATE_PIE_SCRIPT): Likewise. * emulparams/elf32_sparc.sh (GENERATE_PIE_SCRIPT): Likewise. * emulparams/elf64_sparc.sh (GENERATE_PIE_SCRIPT): Likewise. * emulparams/elf64alpha.sh (GENERATE_PIE_SCRIPT): Likewise. * emulparams/elf64_s390.sh (GENERATE_PIE_SCRIPT): Likewise. * emulparams/elf_i386.sh (GENERATE_PIE_SCRIPT): Likewise.
2003-04-24oops - omitted from previous deltaNick Clifton2-0/+174
2003-04-24Add support for h8300hn and h8300snNick Clifton1-0/+7
2003-04-18Define __data and __rdataNick Clifton1-0/+2
2003-04-16 Add .jcr section mapping.Nick Clifton1-0/+1
2003-04-14 * scripttempl/elf.sc (CTOR): Handle crtbeginS.o, crtendS.o andAlan Modra9-36/+36
other variants of crtbegin.o, crtend.o. (DTOR): Likewise. * scripttempl/crisaout.sc (ctors, dtors): Likewise. * scripttempl/elf_chaos.sc (CTOR, DTOR): Likewise. * scripttempl/elfd10v.sc (CTOR, DTOR): Likewise. * scripttempl/elfd30v.sc (CTOR, DTOR): Likewise. * scripttempl/elfxtensa.sc (CTOR, DTOR): Likewise. * scripttempl/iq2000.sc (CTOR, DTOR): Likewise. * scripttempl/mmo.sc (ctors, dtors): Likewise. * scripttempl/xstormy16.sc (CTOR, DTOR): Likewise.
2003-04-09Add initX, finiX, ctors, dtors sections to respect C++ constructor/destructor.Nick Clifton2-0/+62
Add ctors/dtors start/stop definitions.
2003-04-04Namespace cleanup for the tic4x target. Replace s/c4x/tic4x/ and ↵Svein Seldal1-2/+2
s/c3x/tic3x/. 2003 copyright update
2003-04-01Add Xtensa portNick Clifton1-0/+397
2003-03-25Add iWMMXt supportNick Clifton1-2/+2
2003-03-03* scripttempl/pe.sc: Use PROVIDE with etext, end, _end,Christopher Faylor1-3/+3
2003-02-11Add new data anchors defenitions.Nick Clifton2-0/+8
2003-01-20Updates for fixing tic4x arch tagging of its object files.Svein Seldal2-149/+116
* bfd/coffcode.h (coff_set_flags): Added get/set arch hooks. * include/coff/tic4x.h (TICOFF_TARGET_MACHINE_GET): Fixed define bug * include/coff/ti.h (TICOFF_TARGET_MACHINE_GET): Added macros * ld/Makefile.am: Added etic3xcoff.o and etic4xcoff_onchip.o * ld/Makefile.in: Regenerate * ld/configure.tgt: Added extra target emulations * ld/emulparams/tic3xcoff.sh: Remove old settings * ld/emulparams/tic4xcoff.sh: Ditto * ld/emulparams/tic3xcoff-onchip.sh: Added new * ld/scripttempl/tic4xcoff.sc: Revise and combine both c3x and c4x * ld/scripttempl/tic3xcoff.sc: Remove
2003-01-04 * Makefile.am (ALL_EMULATIONS): Add eelf32iq2000.o.Stan Cox1-0/+443
(eelf32iq2000.c): New target. * Makefile.in: Regenerate. * configure.tgt: Handle iq2000-*-elf. * emulparams/elf32iq10.sh: New file. * emulparams/elf32iq2000.sh: New file. * scripttempl/iq2000.sc: New file.
2002-12-30Add support for msp430.Nick Clifton2-0/+345
2002-10-23(__RUNTIME_PSEUDO_RELOC_LIST__, __RUNTIME_PSEUDO_RELOC_LIST_END__): AddNick Clifton1-4/+4
only when relocating.
2002-10-13 * scripttempl/elfm68hc11.sc: Use KEEP for .vectors, .installN,Stephane Carrez2-22/+22
.finiN section. * scripttempl/elfm68hc12.sc: Likewise.
2002-09-30 * scripttempl/elfd30v.sc: Order reloc sections placing .plt last.Alan Modra3-49/+47
* scripttempl/elfm68hc11.sc: Likewise. * scripttempl/elfm68hc12.sc: Likewise.
2002-09-25 From "Anita Kulkarni" <AnitaK@kpit.com>Daniel Jacobowitz1-0/+5
* scripttempl/sh.sc: Handle .eh_frame* and .gcc_exc* sections.
2002-09-25 * genscripts.sh (SEGMENT_SIZE): Use MAXPAGESIZE beforeAlan Modra1-2/+2
TARGET_PAGE_SIZE. * scripttempl/elf.sc (DATA_SEGMENT_ALIGN): Incorporate SEGMENT_SIZE alignment. * emulparams/elf64ppc.sh (DATA_ADDR): Delete. (SEGMENT_SIZE): Define.
2002-09-24 * emulparams/elf64ppc.sh (DATA_ADDR): Define.Alan Modra1-1/+1
* emulparams/elf64_aix.sh (DATA_ADDR): Don't use a fixed address for start of .data, instead align up to 256M boundary. * scripttempl/aix.sc: Likewise.
2002-09-23* scripttempl/i386go32.sc: Handle bss unique sections.DJ Delorie1-1/+1
2002-09-02Add EXTERN references to __ctbpm __gp and __ep.Nick Clifton1-0/+1
Define TEMPLATE_NAME. Revert bogus change to ldexp.c
2002-08-30Update description to reflect D10V TS3 board.Nick Clifton1-5/+14
2002-08-28Add TMS320C4x supportNick Clifton2-0/+184
2002-08-27Handle .rdata_runtime_pseudo_reloc sections.Nick Clifton1-0/+5
2002-08-01Revert Adam Nemet's THUMB PLT patchNick Clifton1-4/+0
2002-07-31Add support for Thumb PLT entries with interworkingNick Clifton1-0/+4
2002-07-17Add IP2k support to BFD and LDNick Clifton1-0/+150
2002-06-29 * emulparams/m68hc12elfb.sh (EEPROM_MEMORY): Define.Stephane Carrez2-0/+25
* emulparams/m68hc11elfb.sh (EEPROM_MEMORY): Define. * emulparams/m68hc11elf.sh (EEPROM_SIZE): Define. (EEPROM_START_ADDR): Define. (EEPROM_MEMORY): Define. * emulparams/m68hc12elf.sh: Likewise. * scripttempl/elfm68hc11.sc: Handle .eeprom section; handle .softregs section to put soft registers in .page0. * scripttempl/elfm68hc12.sc: Likewise but put soft registers in bss.
2002-06-17Fix ld segfault for some elf targets. Fix default layout for d10v.Tom Rix1-3/+3
2002-06-07 * scripttempl/elf.sc (.tbss): Fix mismatched parentheses/braces.Alan Modra1-1/+1
2002-06-01 * scripttempl/avr.sc: Changes to support current GCC and avr-libc,Marek Michalkiewicz1-4/+44
C++ constructors/destructors, loosely based on the m68hc11 port.
2002-05-28Add DLX targetNick Clifton1-0/+30
2002-05-27Install new elf_chaos.sc script.Nick Clifton1-0/+354
2002-05-23 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCALJakub Jelinek1-0/+8
for symbols from SHF_TLS section. (_bfd_elf_print_private_bfd_data): Add PT_TLS. (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections. (map_sections_to_segments): Build PT_TLS segment if necessary. (assign_file_positions_for_segments): Likewise. (get_program_header_size): Account for PT_TLS segment. (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from SEC_THREAD_LOCAL sections to STT_TLS. * reloc.c: Add 386 and IA-64 TLS relocs. * section.c (SEC_THREAD_LOCAL): Define. (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS): Remove. * elflink.h (elf_link_add_object_symbols): Support .tcommon. (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS unconditionally. (struct elf_final_link_info): Add first_tls_sec. (elf_bfd_final_link): Set first_tls_sec. Compute elf_hash_table (info)->tls_segment. (elf_link_output_extsym): Handle STT_TLS symbols. (elf_link_input_bfd): Likewise. * syms.c (BSF_THREAD_LOCAL): Define. * bfd-in2.h: Rebuilt. * libbfd.h: Rebuilt. * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff, elf_i386_mkobject, elf_i386_object_p): New functions. (elf_howto_table): Add TLS relocs. (elf_i386_reloc_type_lookup): Support TLS relocs. (elf_i386_info_to_howto_rel): Likewise. (struct elf_i386_link_hash_entry): Add tls_type. (struct elf_i386_obj_tdata): New. (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type): New macros. (struct elf_i386_link_hash_table): Add tls_ldm_got. (link_hash_newfunc): Clear tls_type. (elf_i386_check_relocs): Support TLS relocs. (elf_i386_gc_sweep_hook): Likewise. (allocate_dynrelocs): Likewise. (elf_i386_size_dynamic_sections): Likewise. (elf_i386_relocate_section): Likewise. (elf_i386_finish_dynamic_symbol): Likewise. (bfd_elf32_mkobject, elf_backend_object_p): Define. * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset, dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done, want_tprel, want_dtpmod, want_dtprel. (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions. (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to R_IA64_LTOFF_TPREL22. (elf_code_to_howto_index): Add TLS relocs. (elfNN_ia64_check_relocs): Support TLS relocs. (allocate_global_data_got): Account for TLS .got data. (allocate_dynrel_entries): Account for TLS dynamic relocations. (elfNN_ia64_install_value): Supprt TLS relocs. (set_got_entry): Support TLS relocs. (elfNN_ia64_relocate_section): Likewise. * config/obj-elf.c (elf_common): Renamed from obj_elf_common. (obj_elf_common): Call elf_common. (obj_elf_tls_common): New function. (elf_pseudo_tab): Support .tls_common. (special_sections): Add .tdata and .tbss. (obj_elf_change_section): Set SEC_THREAD_LOCAL for SHF_TLS sections. (obj_elf_parse_section_letters): Support T in section flags (SHF_TLS). (obj_elf_parse_section_letters): Include T in error message. * config/tc-ppc.c (ppc_section_letter): Likewise. * config/tc-alpha.c (alpha_elf_section_letter): Likewise. (tc_gen_reloc): Handle SEC_THREAD_LOCAL the same way as SEC_MERGE. * config/tc-sparc.c (md_apply_fix3): Likewise. * config/tc-i386.c (tc_i386_fix_adjustable): Add TLS relocs. Define them if not BFD_ASSEMBLER. (lex_got): Support @TLSGD, @TLSLDM, @GOTTPOFF, @TPOFF, @DTPOFF and @NTPOFF. (md_apply_fix3): Add TLS relocs. * config/tc-ia64.c (enum reloc_func): Add FUNC_DTP_MODULE, FUNC_DTP_RELATIVE, FUNC_TP_RELATIVE, FUNC_LT_DTP_MODULE, FUNC_LT_DTP_RELATIVE, FUNC_LT_TP_RELATIVE. (pseudo_func): Support @dtpmod(), @dtprel() and @tprel(). (ia64_elf_section_letter): Include T in error message. (md_begin): Support TLS operators. (md_operand): Likewise. (ia64_gen_real_reloc_type): Support TLS relocs. * testsuite/gas/i386/tlspic.s: New file. * testsuite/gas/i386/tlsd.s: New file. * testsuite/gas/i386/tlsnopic.s: New file. * testsuite/gas/i386/tlsd.d: New file. * testsuite/gas/i386/tlsnopic.d: New file. * testsuite/gas/i386/tlspic.d: New file. * testsuite/gas/i386/i386.exp: Add tlsd, tlsnopic and tlspic tests. * testsuite/gas/ia64/tls.s: New file. * testsuite/gas/ia64/tls.d: New file. * testsuite/gas/ia64/ia64.exp: Add tls test. * write.c (adjust_reloc_syms): Don't change symbols in SEC_THREAD_LOCAL sections to STT_SECTION + addend. * elf/common.h (PT_TLS, SHF_TLS, STT_TLS, DF_STATIC_TLS): Define. * elf/ia64.h (R_IA64_LTOFF_TPREL22): Renamed from R_IA64_LTOFF_TP22. * elf/i386.h: Add TLS relocs. * scripttempl/elf.sc: Add .rel{,a}.t{bss,data}, .tdata and .tbss. * ldlang.c (lang_add_section): Set SEC_THREAD_LOCAL for output section if necessary. Handle .tbss. (lang_size_sections): Clear _raw_size for .tbss section (it allocates space in PT_TLS segment only). * ldwrite.c (build_link_order): Build link order for .tbss too. * readelf.c (get_segment_type): Add PT_TLS. (get_elf_section_flags): Add SHF_TLS. (get_dynamic_flags): Optimize. Add DF_STATIC_TLS. (process_dynamic_segment): Use puts instead of printf. (get_symbol_type): Support STT_TLS. * objdump.c (dump_section_header): Remove SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS. Add SEC_THREAD_LOCAL.