summaryrefslogtreecommitdiff
path: root/ld/genscripts.sh
Commit message (Collapse)AuthorAgeFilesLines
* Update year range in copyright notice of binutils filesAlan Modra2023-01-011-1/+1
| | | | | | The newer update-copyright.py fixes file encoding too, removing cr/lf on binutils/bfdtest2.c and ld/testsuite/ld-cygwin/exe-export.exp, and embedded cr in binutils/testsuite/binutils-all/ar.exp string match.
* Update year range in copyright notice of binutils filesAlan Modra2022-01-021-1/+1
| | | | | | | | | | The result of running etc/update-copyright.py --this-year, fixing all the files whose mode is changed by the script, plus a build with --enable-maintainer-mode --enable-cgen-maint=yes, then checking out */po/*.pot which we don't update frequently. The copy of cgen was with commit d1dd5fcc38ead reverted as that commit breaks building of bfp opcodes files.
* Update year range in copyright notice of binutils filesAlan Modra2021-01-011-1/+1
|
* Update year range in copyright notice of binutils filesAlan Modra2020-01-011-1/+1
|
* genscripts comment tidyAlan Modra2019-10-161-58/+37
| | | | | | | | | | | | | | | Some of the comments in this file are ancient and no longer reflect reality. This patch removes those comments, and also the description of ld options emitted to script files. While describing what an option does in the script file might help reinforce what the option does, it's unnecessary and makes for overlong lines. Also, some of the descriptions did not mention all the options. * genscripts.sh: Correct comments. Remove outdated comment block saying "Generate 5 or 6 script files..". Remove description of ld options from comment emitted to script files, and order options as per comment block in genscripts.sh saying which scripts are generated.
* Fix automatic makefile dependencies for generated ld/e*.cAlan Modra2019-04-231-11/+17
| | | | | | | | | Commit c40e31a121 broke --enable-dependency-tracking=no. * Makefile.am (GENDEPDIR): New var, used.. (GENSCRIPTS): ..here. * Makefile.in: Regenerate. * genscripts.sh: Test for $DEPDIR set before every use.
* Automatic makefile dependencies for generated ld/e*.cAlan Modra2019-04-131-97/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch modifies genscripts.sh to emit dependency info along with the generated emulation e*.c files. This is done by a new source_sh function that records its arg to a file (.deps/e*.Tc), using the function whenever a shell script is sourced. Entries in the file are made unique and written to .deps/e*.Pc. These files are then included by the Makefile. * Makefile.am (GENSCRIPTS): Pass LIB_PATH as a parameter. Add DEPDIR parameter. (ELF_DEPS, ELF_GEN_DEPS, ELF_X86_DEPS): Delete. (ALL_EMULATION_SOURCES, ALL_64_EMULATION_SOURCES): Depend on $GEN_DEPENDS. (e*.c): Delete all dependencies, instead include dependencies from $DEPDIR/*.Pc. * Makefile.in: Regenerate. * configure.ac (source_sh): Define and use function. * configure: Regenerate. * emulparams/aarch64cloudabib.sh, * emulparams/aarch64elf32b.sh, * emulparams/aarch64elfb.sh, * emulparams/aarch64fbsdb.sh, * emulparams/aarch64linux32b.sh, * emulparams/aarch64linuxb.sh, * emulparams/arcelf.sh, * emulparams/arcelf_prof.sh, * emulparams/arclinux.sh, * emulparams/arclinux_nps.sh, * emulparams/arclinux_prof.sh, * emulparams/arcv2elf.sh, * emulparams/arcv2elfx.sh, * emulparams/armelf_fbsd.sh, * emulparams/armelf_linux_eabi.sh, * emulparams/armelf_linux_fdpiceabi.sh, * emulparams/armelf_nacl.sh, * emulparams/armelf_nbsd.sh, * emulparams/armelf_vxworks.sh, * emulparams/armelfb.sh, * emulparams/armelfb_fbsd.sh, * emulparams/armelfb_fuchsia.sh, * emulparams/armelfb_linux.sh, * emulparams/armelfb_linux_eabi.sh, * emulparams/armelfb_linux_fdpiceabi.sh, * emulparams/armelfb_nacl.sh, * emulparams/armelfb_nbsd.sh, * emulparams/armsymbian.sh, * emulparams/cskyelf_linux.sh, * emulparams/elf32_sparc_sol2.sh, * emulparams/elf32_sparc_vxworks.sh, * emulparams/elf32_tic6x_be.sh, * emulparams/elf32_tic6x_elf_be.sh, * emulparams/elf32_tic6x_elf_le.sh, * emulparams/elf32_tic6x_linux_be.sh, * emulparams/elf32_tic6x_linux_le.sh, * emulparams/elf32_x86_64.sh, * emulparams/elf32_x86_64_nacl.sh, * emulparams/elf32b4300.sh, * emulparams/elf32bfinfd.sh, * emulparams/elf32bmipn32.sh, * emulparams/elf32bsmip.sh, * emulparams/elf32btsmip.sh, * emulparams/elf32btsmip_fbsd.sh, * emulparams/elf32btsmipn32.sh, * emulparams/elf32btsmipn32_fbsd.sh, * emulparams/elf32ebmip.sh, * emulparams/elf32ebmipvxworks.sh, * emulparams/elf32elmip.sh, * emulparams/elf32elmipvxworks.sh, * emulparams/elf32frvfd.sh, * emulparams/elf32l4300.sh, * emulparams/elf32lm32fd.sh, * emulparams/elf32lmip.sh, * emulparams/elf32lppc.sh, * emulparams/elf32lppclinux.sh, * emulparams/elf32lppcnto.sh, * emulparams/elf32lppcsim.sh, * emulparams/elf32lr5900.sh, * emulparams/elf32lr5900n32.sh, * emulparams/elf32lriscv.sh, * emulparams/elf32lriscv_ilp32.sh, * emulparams/elf32lriscv_ilp32f.sh, * emulparams/elf32lsmip.sh, * emulparams/elf32ltsmip.sh, * emulparams/elf32ltsmip_fbsd.sh, * emulparams/elf32ltsmipn32.sh, * emulparams/elf32ltsmipn32_fbsd.sh, * emulparams/elf32microblazeel.sh, * emulparams/elf32or1k_linux.sh, * emulparams/elf32ppc.sh, * emulparams/elf32ppc_fbsd.sh, * emulparams/elf32ppccommon.sh, * emulparams/elf32ppclinux.sh, * emulparams/elf32ppcnto.sh, * emulparams/elf32ppcsim.sh, * emulparams/elf32ppcvxworks.sh, * emulparams/elf32ppcwindiss.sh, * emulparams/elf32tilegx_be.sh, * emulparams/elf64_ia64_fbsd.sh, * emulparams/elf64_sparc_fbsd.sh, * emulparams/elf64_sparc_sol2.sh, * emulparams/elf64alpha_fbsd.sh, * emulparams/elf64alpha_nbsd.sh, * emulparams/elf64bmip-defs.sh, * emulparams/elf64bmip.sh, * emulparams/elf64btsmip.sh, * emulparams/elf64btsmip_fbsd.sh, * emulparams/elf64lppc.sh, * emulparams/elf64lriscv-defs.sh, * emulparams/elf64lriscv.sh, * emulparams/elf64lriscv_lp64.sh, * emulparams/elf64lriscv_lp64f.sh, * emulparams/elf64ltsmip.sh, * emulparams/elf64ltsmip_fbsd.sh, * emulparams/elf64ppc.sh, * emulparams/elf64ppc_fbsd.sh, * emulparams/elf64rdos.sh, * emulparams/elf64tilegx_be.sh, * emulparams/elf_i386.sh, * emulparams/elf_i386_be.sh, * emulparams/elf_i386_fbsd.sh, * emulparams/elf_i386_ldso.sh, * emulparams/elf_i386_nacl.sh, * emulparams/elf_i386_sol2.sh, * emulparams/elf_i386_vxworks.sh, * emulparams/elf_iamcu.sh, * emulparams/elf_k1om.sh, * emulparams/elf_k1om_fbsd.sh, * emulparams/elf_l1om.sh, * emulparams/elf_l1om_fbsd.sh, * emulparams/elf_x86_64.sh, * emulparams/elf_x86_64_cloudabi.sh, * emulparams/elf_x86_64_fbsd.sh, * emulparams/elf_x86_64_nacl.sh, * emulparams/elf_x86_64_sol2.sh, * emulparams/h8300helf.sh, * emulparams/h8300helf_linux.sh, * emulparams/h8300hnelf.sh, * emulparams/h8300self.sh, * emulparams/h8300self_linux.sh, * emulparams/h8300snelf.sh, * emulparams/h8300sxelf.sh, * emulparams/h8300sxelf_linux.sh, * emulparams/h8300sxnelf.sh, * emulparams/hppanbsd.sh, * emulparams/hppaobsd.sh, * emulparams/m32rlelf.sh, * emulparams/m32rlelf_linux.sh, * emulparams/m68kelfnbsd.sh, * emulparams/mn10300.sh, * emulparams/msp430X.sh, * emulparams/nds32belf.sh, * emulparams/nds32belf16m.sh, * emulparams/nds32belf_linux.sh, * emulparams/pjlelf.sh, * emulparams/ppclynx.sh, * emulparams/score7_elf.sh, * emulparams/shelf_fd.sh, * emulparams/shelf_linux.sh, * emulparams/shelf_nbsd.sh, * emulparams/shelf_uclinux.sh, * emulparams/shelf_vxworks.sh, * emulparams/shl.sh, * emulparams/shlelf.sh, * emulparams/shlelf_fd.sh, * emulparams/shlelf_nbsd.sh, * emulparams/shlelf_vxworks.sh: Use source_sh. * genscripts.sh: Adjust for changed parameters. Emit dependencies for e*.c to .deps/*.Pc. (source_sh): New function, use it throughout to source scripts. * genscrba.sh (source_em): Use source_sh.
* Update year range in copyright notice of binutils filesAlan Modra2019-01-011-1/+1
|
* ld: Enable using separate linker script for -z relroAndreas Krebbel2018-07-181-7/+143
| | | | | | | | | | | | | | | | | | | | | | | With this patch dedicated linker scripts can be generated for partial relro triggered by defining GENERATE_RELRO_SCRIPT in the target specific scripts. This is necessary for e.g. S/390 where usually the .got.plt comes first and prevents the relro segment from being extended across the non-plt GOT entries. The patch started with the work from Marcin taken from the mwk user branches. However, the patch needed substantial changes due to the 'separate code' feature which got committed in the meantime. ld/ChangeLog: 2018-07-18 Andreas Krebbel <krebbel@linux.ibm.com> Marcin Koƛcielnicki <koriakin@0x04.net> * emultempl/elf32.em: Add code to pick dedicated linker scripts for partial relro. * genscripts.sh: Generate dedicated linker scripts for partial relro.
* RISC-V: New emulations to make path searches follow glibc ABI.Jim Wilson2018-05-081-10/+12
| | | | | | | | | | | | | | | | | | | | | | ld/ PR ld/22962 * Makefile.am (ALL_EMULATION_SOURCES): Add eelf32lriscv_ilp32f.c, eelf32lriscv_ilp32.c, eelf64lriscv_lp64f.c, eelf64lriscv_lp64.c. (eelf32lriscv_ilp32f.c, eelf32lriscv_ilp32.c): New build rules. (eelf64lriscv_lp64f.c, eelf64lriscv_lp64.c): New build rules. * Makefile.in: Regenerated. * configure.tgt (riscv32*-*-linux*, riscv64*-*-linux*): New. * ld/emulparams/elf32lriscv.sh: Set LIBPATH_SUFFIX. * ld/emulparams/elf32lriscv_ilp32.sh: New. * ld/emulparams/elf32lriscv_ilp32f.sh: New. * ld/emulparams/elf64lriscv-defs.sh: Don't set LIBPATH_SUFFIX here. * ld/emulparams/elf64lriscv.sh: Set LIBPATH_SUFFIX. * ld/emulparams/elf64lriscv_lp64.sh: New. * ld/emulparams/elf64lriscv_lp64f.sh: New. * ld/genscripts.sh (append_to_lib_path): Change LIBPATH_SUFFIX test to a for. Inside loop, change LIBPATH_SUFFIX uses to libpath_suffix. (LIB_PATH): In LIB_PATH if, add loop for LIBPATH_SUFFIX, changes uses inside loop to libpath_suffix.
* ld: Add "-z separate-code" option to ELF linkerH.J. Lu2018-01-111-8/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new "-z separate-code" option will generate separate code LOAD segment which must be in wholly disjoint pages from any other data. include/ PR ld/22393 * bfdlink.h (bfd_link_info): Add separate_code. ld/ PR ld/22393 * NEWS: Mention "-z separate-code". * emultempl/elf32.em (gld${EMULATION_NAME}_get_script): Get builtin linker scripts and return linker scripts from disk for "-z separate-code". (gld${EMULATION_NAME}_handle_option): Handle "-z separate-code" and "-z noseparate-code". * genscripts.sh: Generate linker scripts for "-z separate-code". (LD_FLAG): Set to *textonly for "-z separate-code". * ld.texinfo: Document "-z separate-code". * lexsup.c (elf_shlib_list_options): Add linker help messsages for "-z separate-code" and "-z noseparate-code". * scripttempl/elf.sc (SEPARATE_TEXT): New (TEXT_SEGMENT_ALIGN): Likewise. Use ${TEXT_SEGMENT_ALIGN} to align and pad text segment to ${MAXPAGESIZE}.
* Update year range in copyright notice of binutils filesAlan Modra2018-01-031-1/+1
|
* ld whitespace fixesAlan Modra2017-10-121-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pe-dll.c: Formatting, whitespace fixes. * NEWS: Whitespace fixes. * configure.ac: Likewise. * configure.tgt: Likewise. * deffilep.y: Likewise. * genscripts.sh: Likewise. * ld.texinfo: Likewise. * ldgram.y: Likewise. * ldlang.c: Likewise. * ldlex.l: Likewise. * lexsup.c: Likewise. * plugin.c: Likewise. * emulparams/arc-endianness.sh: Likewise. * emulparams/elf32_x86_64.sh: Likewise. * emulparams/elf64mmix.sh: Likewise. * emulparams/elf_x86_64.sh: Likewise. * emulparams/h8300elf.sh: Likewise. * emulparams/h8300elf_linux.sh: Likewise. * emulparams/vxworks.sh: Likewise. * emultempl/aarch64elf.em: Likewise. * emultempl/aix.em: Likewise. * emultempl/armelf.em: Likewise. * emultempl/avrelf.em: Likewise. * emultempl/beos.em: Likewise. * emultempl/hppaelf.em: Likewise. * emultempl/m68kcoff.em: Likewise. * emultempl/m68kelf.em: Likewise. * emultempl/metagelf.em: Likewise. * emultempl/msp430.em: Likewise. * emultempl/nds32elf.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/pep.em: Likewise. * emultempl/ppc64elf.em: Likewise. * emultempl/sh64elf.em: Likewise. * emultempl/spu_ovl.S: Likewise. * emultempl/spuelf.em: Likewise. * emultempl/tic6xdsbt.em: Likewise. * emultempl/ticoff.em: Likewise. * emultempl/vms.em: Likewise. * po/Make-in: Likewise. * scripttempl/DWARF.sc: Likewise. * scripttempl/aix.sc: Likewise. * scripttempl/alpha.sc: Likewise. * scripttempl/alphavms.sc: Likewise. * scripttempl/aout.sc: Likewise. * scripttempl/arclinux.sc: Likewise. * scripttempl/armaout.sc: Likewise. * scripttempl/armbpabi.sc: Likewise. * scripttempl/armcoff.sc: Likewise. * scripttempl/avr.sc: Likewise. * scripttempl/crisaout.sc: Likewise. * scripttempl/delta68.sc: Likewise. * scripttempl/dlx.sc: Likewise. * scripttempl/elf.sc: Likewise. * scripttempl/elf32cr16.sc: Likewise. * scripttempl/elf32cr16c.sc: Likewise. * scripttempl/elf32crx.sc: Likewise. * scripttempl/elf32msp430.sc: Likewise. * scripttempl/elf32msp430_3.sc: Likewise. * scripttempl/elf32sh-symbian.sc: Likewise. * scripttempl/elf32xc16x.sc: Likewise. * scripttempl/elf32xc16xl.sc: Likewise. * scripttempl/elf32xc16xs.sc: Likewise. * scripttempl/elf64hppa.sc: Likewise. * scripttempl/elf_chaos.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise. * scripttempl/elfd10v.sc: Likewise. * scripttempl/elfd30v.sc: Likewise. * scripttempl/elfi370.sc: Likewise. * scripttempl/elfm68hc11.sc: Likewise. * scripttempl/elfm68hc12.sc: Likewise. * scripttempl/elfmicroblaze.sc: Likewise. * scripttempl/elfxgate.sc: Likewise. * scripttempl/elfxtensa.sc: Likewise. * scripttempl/epiphany_4x4.sc: Likewise. * scripttempl/epocpe.sc: Likewise. * scripttempl/h8300.sc: Likewise. * scripttempl/h8300h.sc: Likewise. * scripttempl/h8300hn.sc: Likewise. * scripttempl/h8300s.sc: Likewise. * scripttempl/h8300sn.sc: Likewise. * scripttempl/h8300sx.sc: Likewise. * scripttempl/h8300sxn.sc: Likewise. * scripttempl/h8500.sc: Likewise. * scripttempl/h8500b.sc: Likewise. * scripttempl/h8500c.sc: Likewise. * scripttempl/h8500m.sc: Likewise. * scripttempl/h8500s.sc: Likewise. * scripttempl/hppaelf.sc: Likewise. * scripttempl/i386beos.sc: Likewise. * scripttempl/i386coff.sc: Likewise. * scripttempl/i386go32.sc: Likewise. * scripttempl/i386msdos.sc: Likewise. * scripttempl/i860coff.sc: Likewise. * scripttempl/i960.sc: Likewise. * scripttempl/ia64vms.sc: Likewise. * scripttempl/ip2k.sc: Likewise. * scripttempl/iq2000.sc: Likewise. * scripttempl/m68kaux.sc: Likewise. * scripttempl/m68kcoff.sc: Likewise. * scripttempl/m88kbcs.sc: Likewise. * scripttempl/mcorepe.sc: Likewise. * scripttempl/mep.sc: Likewise. * scripttempl/mips.sc: Likewise. * scripttempl/mipsbsd.sc: Likewise. * scripttempl/mmo.sc: Likewise. * scripttempl/moxie.sc: Likewise. * scripttempl/nds32elf.sc: Likewise. * scripttempl/nw.sc: Likewise. * scripttempl/pe.sc: Likewise. * scripttempl/pep.sc: Likewise. * scripttempl/pj.sc: Likewise. * scripttempl/ppcpe.sc: Likewise. * scripttempl/psos.sc: Likewise. * scripttempl/riscix.sc: Likewise. * scripttempl/sh.sc: Likewise. * scripttempl/sparccoff.sc: Likewise. * scripttempl/st2000.sc: Likewise. * scripttempl/tic30aout.sc: Likewise. * scripttempl/tic30coff.sc: Likewise. * scripttempl/tic4xcoff.sc: Likewise. * scripttempl/tic54xcoff.sc: Likewise. * scripttempl/tic80coff.sc: Likewise. * scripttempl/v850.sc: Likewise. * scripttempl/v850_rh850.sc: Likewise. * scripttempl/vanilla.sc: Likewise. * scripttempl/visium.sc: Likewise. * scripttempl/w65.sc: Likewise. * scripttempl/xstormy16.sc: Likewise. * scripttempl/z80.sc: Likewise. * scripttempl/z8000.sc: Likewise. * configure: Regenerate.
* Update year range in copyright notice of all files.Alan Modra2017-01-021-1/+1
|
* Copyright update for binutilsAlan Modra2016-01-011-1/+1
|
* ChangeLog rotatation and copyright year updateAlan Modra2015-01-021-1/+1
|
* fix 2014-05-28 ld Makefile.am changesAlan Modra2014-06-021-8/+2
| | | | | | | | | | | | | | | | | | | | | | bfin, msp, and score all used an extra parameter to genscripts.sh to select a "customizer_script" different from the standard one named from the emulation. This patch renames the scripts to avoid the need, tidying them in the process. * emulparams/elf32bfin.sh: Rename from bfin.sh. * emulparams/elf32bfinfd.sh: Update to suit. * emulparams/: Delete. * emulparams/msp430.sh: Rename from msp430all.sh. Remove MSP430_NAME and msp430X vars. * emulparams/msp430X.sh: New. * emulparams/: Delete. * emulparams/score3_elf.sh: Rename from scoreelf.sh. Remove SCORE_NAME and score7_elf ARCH setting. * emulparams/score7_elf.sh: New. * Makefile.am (eelf32bfin.c, eelf32bfinfd.c): Update dependencies. (emsp430.c, emsp430X.c, escore3_elf.c, escore7_elf.c): Likewise. * Makefile.in: Regenerate. * genscripts.sh: Delete customizer_script param.
* Update copyright yearsAlan Modra2014-03-051-1/+1
|
* Allow ld target customiser script to force on disk scripts.Alan Modra2014-01-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Mucking with EMULATION_LIBPATH has unwanted side effects. Allow nds32 emulparams scripts to disable compiled-in scripts naturally, by setting COMPILE_IN=no. * genscripts.sh (COMPILE_IN): Don't set if already set. * emulparams/nds32elf.sh: Don't clear EMULATION_LIBPATH, set COMPILE_IN=no. * emulparams/nds32elf16m.sh: Likewise. * emulparams/nds32elf_linux.sh: Likewise. * emultempl/aix.em: Test COMPILE_IN value is "yes". * emultempl/armcoff.em: Likewise. * emultempl/elf32.em: Likewise. * emultempl/generic.em: Likewise. * emultempl/gld960.em: Likewise. * emultempl/gld960c.em: Likewise. * emultempl/linux.em: Likewise. * emultempl/lnk960.em: Likewise. * emultempl/m68kcoff.em: Likewise. * emultempl/sunos.em: Likewise. * emultempl/ticoff.em: Likewise.
* Skip directories with LIBPATH_SUFFIX_SKIP suffixH.J. Lu2014-01-151-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Linux/x86-64, when binutils is configured with --libdir=/usr/lib64, genscripts.sh treats /usr/lib64 as the default search directory. It puts /usr/lib64 in linker scripts for all emulations, like --- /* Script for -z combreloc: combine and sort reloc sections */ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") OUTPUT_ARCH(i386) ENTRY(_start) SEARCH_DIR("/usr/x86_64-redhat-linux/lib32"); SEARCH_DIR("/usr/i386-redhat-linux/lib32"); SEARCH_DIR("/usr/lib6432"); SEARCH_DIR("/usr/local/lib32"); SEARCH_DIR("/lib32"); SEARCH_DIR("/usr/lib32"); SEARCH_DIR("/usr/i386-redhat-linux/lib"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); --- /usr/lib6432 is odd and /usr/lib64 is wrong. This patch changes genscripts.sh to check LIBPATH_SUFFIX_SKIP if it is defined. It skips directories with LIBPATH_SUFFIX_SKIP suffix. PR ld/16456 * genscripts.sh: Don't search directory with LIBPATH_SUFFIX_SKIP suffix. * emulparams/elf32_x86_64.sh (LIBPATH_SUFFIX_SKIP): Set to 64 for elf32_x86_64 emulation. * emulparams/elf_i386.sh (LIBPATH_SUFFIX_SKIP): Set to 64 for elf_i386 emulation.
* * genscripts.sh (LIB_PATH): Don't exclude libdir or tooldir whenAlan Modra2013-09-241-87/+70
| | | | | | | sysrooted. Also, don't always add tooldir when non-sysrooted. Instead add both when native and tooldir also when TOOL_DIR is defined. Always prepend '=' to paths when sysrooted. Always put paths with LIBPATH_SUFFIX first in search order.
* Add SORT_BY_INIT_PRIORITY.H.J. Lu2010-12-151-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bfd/ 2010-12-15 H.J. Lu <hongjiu.lu@intel.com> * elf.c (_bfd_elf_new_section_hook): Special handling for .init_array/.fini_array output sections. ld/ 2010-12-15 H.J. Lu <hongjiu.lu@intel.com> * Makefile.am (GENSCRIPTS): Add @enable_initfini_array@. * NEWS: Mention SORT_BY_INIT_PRIORITY. * configure.in: Add AC_CANONICAL_BUILD. Add --enable-initfini-array. * genscripts.sh (ENABLE_INITFINI_ARRAY): New. * ld.h (sort_type): Add by_init_priority. * ld.texinfo: Document SORT_BY_INIT_PRIORITY. * ldgram.y (SORT_BY_INIT_PRIORITY): New. (wildcard_spec): Handle SORT_BY_INIT_PRIORITY. * ldlang.c (get_init_priority): New. (compare_section): Use get_init_priority for by_init_priority. * ldlex.l (SORT_BY_INIT_PRIORITY): New. * scripttempl/elf.sc: Support ENABLE_INITFINI_ARRAY. * Makefile.in: Regenerated. * aclocal.m4: Regenerated. * config.in: Likewise. * configure: Likewise. ld/testsuite/ 2010-12-15 H.J. Lu <hongjiu.lu@intel.com> * ld-elf/elf.exp (array_tests): Add init-mixed. (array_tests_static): Likewise. Also delete tmpdir/init-mixed. * ld-elf/init-mixed.c: New. * ld-elf/init-mixed.out: Likewise.
* update copyright datesAlan Modra2009-09-021-1/+1
|
* PR 10061Alan Modra2009-04-241-15/+15
| | | | | * genscripts.sh: Don't pass $EMULATION_NAME as $CUSTOMIZER_SCRIPT param.
* PR ld/5652Nick Clifton2008-01-281-2/+11
| | | | | * genscripts.sh: Check for the existence of BASH_LINENO not just the BASH shell before generating line numbers in the emulation file.
* * genscripts.sh (LIB_PATH): Include both {target_alias} andNick Clifton2007-12-241-0/+21
| | | | {TOOL_LIB} in the search paths for multilibbed targets.
* PR 5215Alan Modra2007-10-261-13/+1
| | | | | * genscripts.sh: Move bash script to.. * genscrba.sh: ..here.
* PR linker/4844Nick Clifton2007-10-011-0/+11
| | | | | | | | | | | | * genscript.sh: Add support for generating a .xa script for use with the --auto-import option. * ld.texinfo: Document the new behaviour of the --auto-import option. * ldint.texinfo: Document new script generation. * emulparams/i386pe.sh (GENERATE_AUTO_IMPORT): Define. * emulparams/i386pe_posix.sh (GENERATE_AUTO_IMPORT): Define. * emulparams/i386pep.sh (GENERATE_AUTO_IMPORT): Define. * emultemp/pe.em (..._get_script): Support the use of the auto import script. * scripttempl/pe.sc: Put the .rdata input sections into the .data output section when creating an auto import script. * scripttempl/pep.sc: Likewise.
* PR 4515Alan Modra2007-08-091-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * genscripts.sh: Delete all references to NONPAGED_TEXT_START_ADDR. * ldint.texinfo: Likewise. * emulparams/armaoutb.sh (NONPAGED_TEXT_START_ADDRESS): Delete. * emulparams/armaoutl.sh: Likewise. * emulparams/arcelf.sh (NONPAGED_TEXT_START_ADDR): Delete. * emulparams/bfin.sh: Likewise * emulparams/crisaout.sh: Likewise * emulparams/elf32_sparc.sh: Likewise * emulparams/elf32am33lin.sh: Likewise * emulparams/elf32b4300.sh: Likewise * emulparams/elf32bmip.sh: Likewise * emulparams/elf32mcore.sh: Likewise * emulparams/elf32xtensa.sh: Likewise * emulparams/elf64_s390.sh: Likewise * emulparams/elf64_sparc.sh: Likewise * emulparams/elf64alpha.sh: Likewise * emulparams/elf_i386.sh: Likewise * emulparams/elf_i386_be.sh: Likewise * emulparams/elf_i386_chaos.sh: Likewise * emulparams/elf_i386_ldso.sh: Likewise * emulparams/elf_i386_vxworks.sh: Likewise * emulparams/elf_s390.sh: Likewise * emulparams/elf_x86_64.sh: Likewise * emulparams/i386aout.sh: Likewise * emulparams/i386moss.sh: Likewise * emulparams/i386msdos.sh: Likewise * emulparams/i386nto.sh: Likewise * emulparams/i386nw.sh: Likewise * emulparams/m68kaout.sh: Likewise * emulparams/m68kelf.sh: Likewise * emulparams/ppcnw.sh: Likewise * emulparams/sun4.sh: Likewise * emulparams/tic80coff.sh: Likewise * emulparams/vaxnbsd.sh: Likewise * emulparams/armnbsd.sh (NONPAGED_TEXT_START_ADDR): Delete. (TEXT_START_ADDR): Set for -n, -N. * emulparams/coff_sparc.sh: Likewise * emulparams/elf32vax.sh: Likewise * emulparams/i386bsd.sh: Likewise * emulparams/i386go32.sh: Likewise * emulparams/i386linux.sh: Likewise * emulparams/i386lynx.sh: Likewise * emulparams/i386mach.sh: Likewise * emulparams/m68k4knbsd.sh: Likewise * emulparams/m68klinux.sh: Likewise * emulparams/m68knbsd.sh: Likewise * emulparams/ns32knbsd.sh: Likewise * emulparams/pc532macha.sh: Likewise * emulparams/ppclynx.sh: Likewise * emulparams/scoreelf.sh: Likewise * emulparams/sparcaout.sh: Likewise * emulparams/sparclinux.sh: Likewise * emulparams/sun3.sh: Likewise * emulparams/vsta.sh: Likewise
* 2007-07-19 Roland McGrath <roland@redhat.com>Roland McGrath2007-07-191-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * genscripts.sh (source_em, fragment): New sh functions. Truncate e${EMULATION_NAME}.c file before .em script fills it. Use source_em in place of . for the .em script. * emultempl/generic.em: Use fragment and source_em functions. * emultempl/aix.em: Likewise. * emultempl/alphaelf.em: Likewise. * emultempl/armcoff.em: Likewise. * emultempl/armelf.em: Likewise. * emultempl/avrelf.em: Likewise. * emultempl/beos.em: Likewise. * emultempl/cr16elf.em: Likewise. * emultempl/crxelf.em: Likewise. * emultempl/elf-generic.em: Likewise. * emultempl/elf32.em: Likewise. * emultempl/genelf.em: Likewise. * emultempl/gld960.em: Likewise. * emultempl/gld960c.em: Likewise. * emultempl/hppaelf.em: Likewise. * emultempl/ia64elf.em: Likewise. * emultempl/irix.em: Likewise. * emultempl/linux.em: Likewise. * emultempl/lnk960.em: Likewise. * emultempl/m68hc1xelf.em: Likewise. * emultempl/m68kcoff.em: Likewise. * emultempl/m68kelf.em: Likewise. * emultempl/mipsecoff.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/mmix-elfnmmo.em: Likewise. * emultempl/mmixelf.em: Likewise. * emultempl/mmo.em: Likewise. * emultempl/needrelax.em: Likewise. * emultempl/netbsd.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/pep.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise. * emultempl/scoreelf.em: Likewise. * emultempl/sh64elf.em: Likewise. * emultempl/spuelf.em: Likewise. * emultempl/sunos.em: Likewise. * emultempl/ticoff.em: Likewise. * emultempl/vanilla.em: Likewise. * emultempl/vxworks.em: Likewise. * emultempl/xtensaelf.em: Likewise. * emultempl/z80.em: Likewise.
* Update sources to GPLv3Nick Clifton2007-07-061-0/+18
|
* * genscripts.sh: Respect LIBPATH_SUFFIX when not using sysroot.Mike Frysinger2006-10-061-0/+8
|
* * Makefile.am (GENSCRIPTS): Pass prefix.Alan Modra2006-04-051-10/+13
| | | | | | | | | * Makefile.in: Regenerate. * genscripts.sh: Adjust for extra parameter. * emultempl/elf32.em (parse_ld_so_conf): Return true iff file exists. (check_ld_so_conf): Use ${prefix}/etc/ld.so.conf if it exists. * NEWS: Update.
* 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2004-10-211-5/+4
| | | | | * genscripts.sh (libpath.exp): Really generate for first emulation only.
* bfd/Jakub Jelinek2004-05-111-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * genscripts.sh: Fix typo.Alan Modra2004-01-281-2/+2
|
* * genscripts.sh: Apply $LIBPATH_SUFFIX to $tool_lib and $libdir too.Alan Modra2004-01-281-4/+14
|
* * Makefile.am (GENSCRIPTS_EXTRA, GEN_EXTRA_DEPENDS): Remove. UseAlan Modra2003-10-161-23/+76
| | | | | | | | | | | | | GENSCRIPTS and GEN_DEPENDS in place of these. * Makefile.in: Regenerate. * genscripts_extra.sh: Delete. Merge extra functionality to.. * genscripts.sh: ..here. * emulparams/gld960.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Define. * emulparams/gld960coff.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto. * emulparams/lnk960.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto. * emulparams/m88kbcs.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto. * emulparams/vanilla.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
* * genscripts.sh (libpath.exp): Only generate for first emulation.Alan Modra2003-08-131-12/+20
| | | | | (LIB_PATH): Correct order of paths. Don't add $tool_lib when already present or when LIB_PATH is set to ":".
* bfd/Jakub Jelinek2003-05-301-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* ld/H.J. Lu2003-05-301-0/+9
| | | | | | | | | | | | | 2003-05-30 H.J. Lu <hongjiu.lu@intel.com> * genscripts.sh: Create tmpdir/libpath.exp. ld/testsuite/ 2003-05-30 H.J. Lu <hongjiu.lu@intel.com> * config/default.exp: Load tmpdir/libpath.exp. (gcc_ld_flag): Set from $libpath.
* * genscripts.sh (LIB_PATH): Don't append LIBPATH_SUFFIX to pathsJakub Jelinek2003-02-071-7/+24
| | | | which already have it. Avoid duplicates.
* * Makefile.am (eelf32iq10.c): Fix tab/whitespace mixup.Daniel Jacobowitz2003-01-061-17/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.am (ldmain.o): Add @TARGET_SYSTEM_ROOT_DEFINE@. (GENSCRIPTS): Add @use_sysroot@. * Makefile.in: Regenerated. * configure.host: Move setting of NATIVE_LIB_DIRS to... * configure.tgt: ... here. Use ${target} instead of ${host} for NATIVE_LIB_DIRS. * configure.in: Add --with-sysroot. * configure: Regenerated. * genscripts.sh: Accept use_sysroot option. Set new variables NATIVE and USE_LIBPATH. Prepend "=" to directory names if $use_sysroot. Don't search $tool_lib if $use_sysroot. * ldfile.c (ldfile_add_library_path): Handle leading '='. * ldmain.c (TARGET_SYSTEM_ROOT): Define if not defined. (ld_sysroot): New variable. (main): Initialize ld_sysroot. * ldmain.h (ld_sysroot): New extern. * emultempl/elf32.em: Use NATIVE and USE_LIBPATH instead of searching $EMULATION_LIBPATH. (gld${EMULATION_NAME}_add_sysroot): New function. (gld${EMULATION_NAME}_check_ld_so_conf): Use it. Honor ld_sysroot. (gld${EMULATION_NAME}_after_open): Likewise. Only search environment variables if $NATIVE. * ld.texinfo (Options): Mention "=" prefix in the description of -L. * NEWS: Mention --with-sysroot. * emulparams/elf32bmipn32-defs.sh: Set NATIVE and LIBPATH_SUFFIX instead of setting LIB_PATH. * emulparams/elf32ppc.sh: Likewise. * emulparams/elf64_s390.sh: Likewise. * emulparams/elf64_sparc.sh: Likewise. * emulparams/elf64ppc.sh: Likewise. * emulparams/elf_x86_64.sh: Likewise. * emulparams/elf64_aix.sh: Add "=" prefixes to LIB_PATH. * emulparams/elf64hppa.sh: Add "=" prefixes to LIB_PATH.
* * genscripts.sh (SEGMENT_SIZE): Use MAXPAGESIZE beforeAlan Modra2002-09-251-1/+1
| | | | | | | | TARGET_PAGE_SIZE. * scripttempl/elf.sc (DATA_SEGMENT_ALIGN): Incorporate SEGMENT_SIZE alignment. * emulparams/elf64ppc.sh (DATA_ADDR): Delete. (SEGMENT_SIZE): Define.
* * genscripts.sh (LIB_PATH): For native targets, concatenate $libdirAlan Modra2002-05-221-18/+12
| | | | | | | | | | | | and $NATIVE_LIB_DIRS. Add $tool_lib before other libs. (LIB_SEARCH_DIRS): No need to use "tr". (COMPILE_IN): Only set for native targets. * configure.host (NATIVE_LIB_DIRS): Specify all native search dirs here, rather than adding lib:/usr/lib:/usr/local/lib in genscripts.sh. * configure.tgt (powerpc*): Set tdir_*. (powerpcle*): Correct targ_extra_emuls. * emulparams/elf32ppc.sh (LIB_PATH): Set up native 64 bit dirs. * emulparams/elf64ppc.sh (LIB_PATH): Likewise.
* * genscripts.sh (LIB_SEARCH_DIRS): Quote path.Alan Modra2002-03-211-1/+1
|
* 2001-10-05 H.J. Lu <hjl@gnu.org>H.J. Lu2001-10-051-1/+1
| | | | * genscripts.sh: Fix a typo in the last change.
* * genscripts.sh: Include a comment at the top of each generatedJim Blandy2001-10-031-8/+17
| | | | script, explaining its purpose.
* * elf-bfd.h (enum elf_reloc_type_class): New.Jakub Jelinek2001-08-231-6/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (struct elf_backend_data): Add elf_backend_reloc_type_class. (_bfd_elf_reloc_type_class): New. * elfxx-target.h (elf_backend_reloc_type_class): Define. (elfNN_bed): Add elf_backend_reloc_type_class. * elf.c (_bfd_elf_reloc_type_class): New. * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc is against read-only section. (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of looking up section names for DT_TEXTREL. (elf_i386_reloc_type_class): New. (elf_backend_reloc_type_class): Define. * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the reloc is against read-only section. (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of looking up section names for DT_TEXTREL. (elf32_sparc_reloc_type_class): New. (elf_backend_reloc_type_class): Define. * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the reloc is against read-only section. (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of looking up section names for DT_TEXTREL. (sparc64_elf_reloc_type_class): New. (elf_backend_reloc_type_class): Define. * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field. (elfNN_ia64_hash_table_create): Clear ia64_info. (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only section. (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag instead of looking up section names for DT_TEXTREL. (elfNN_ia64_reloc_type_class): New. (elf_backend_reloc_type_class): Define. * elflink.h (size_dynamic_sections): Add spare DT_NULL tags. (struct elf_link_sort_rela): New. (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New. (elf_bfd_final_link): Call elf_link_sort_relocs. Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if necessary. * bfdlink.h (struct bfd_link_info): Add combreloc and spare_dynamic_tags fields. * emultempl/elf32.em (place_orphan): Place orphan .rel* sections into .rel.dyn resp. .rela.dyn if combreloc. (get_script): If .x linker script is equal to .xn, only put it once into the binary. Add .xc and .xsc scripts. (parse_args): Handle -z combreloc and -z nocombreloc. * scripttempl/elf.sc (.rela.sbss): Fix a typo. For .xc and .xsc scripts put all .rel* or .rela* input sections but .rel*.plt and PLT-like sections into .rel.dyn resp. .rela.dyn. * genscripts.sh (GENERATE_COMBRELOC_SCRIPT): Set if SCRIPT_NAME is elf. Strip trailing whitespace from script. Generate .xc and .xsc scripts if requested. * ldmain.c (main): Initialize link_info.combreloc and link_info.spare_dynamic_tags. * lexsup.c (OPTION_SPARE_DYNAMIC_TAGS): Define. (ld_options): Add --spare-dynamic-tags option. (parse_args): Likewise. * ld.texinfo: Document -z combreloc and -z nocombreloc. * ldint.texinfo: Document .xc and .xsc linker scripts. * NEWS: Add notes about -z combreloc and SHF_MERGE.
* * genscripts.sh: Source the emulparams script before each outputAlan Modra2001-08-081-12/+18
| | | | | script is generated so that variables like `RELOCATING' may affect variables defined in the emulparams script.