summaryrefslogtreecommitdiff
path: root/ld/configure
Commit message (Collapse)AuthorAgeFilesLines
* Update version number and regenerate filesNick Clifton2022-12-311-10/+10
|
* bfd: linker: merge .sframe sectionsIndu Bhagat2022-11-151-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The linker merges all the input .sframe sections. When merging, the linker verifies that all the input .sframe sections have the same abi/arch. The linker uses libsframe library to perform key actions on the .sframe sections - decode, read, and create output data. This implies buildsystem changes to make and install libsframe before libbfd. The linker places the output .sframe section in a new segment of its own: PT_GNU_SFRAME. A new segment is not added, however, if the generated .sframe section is empty. When a section is discarded from the final link, the corresponding entries in the .sframe section for those functions are also deleted. The linker sorts the SFrame FDEs on start address by default and sets the SFRAME_F_FDE_SORTED flag in the .sframe section. This patch also adds support for generation of SFrame unwind information for the .plt* sections on x86_64. SFrame unwind info is generated for IBT enabled PLT, lazy/non-lazy PLT. The existing linker option --no-ld-generated-unwind-info has been adapted to include the control of whether .sframe unwind information will be generated for the linker generated sections like PLT. Changes to the linker script have been made as necessary. ChangeLog: * Makefile.def: Add install dependency on libsframe for libbfd. * Makefile.in: Regenerated. * bfd/Makefile.am: Add elf-sframe.c * bfd/Makefile.in: Regenerated. * bfd/bfd-in2.h (SEC_INFO_TYPE_SFRAME): Regenerated. * bfd/configure: Regenerate. * bfd/configure.ac: Add elf-sframe.lo. * bfd/elf-bfd.h (struct sframe_func_bfdinfo): New struct. (struct sframe_dec_info): Likewise. (struct sframe_enc_info): Likewise. (struct elf_link_hash_table): New member for encoded .sframe object. (struct output_elf_obj_tdata): New member. (elf_sframe): New access macro. (_bfd_elf_set_section_sframe): New declaration. * bfd/elf.c (get_segment_type): Handle new segment PT_GNU_SFRAME. (bfd_section_from_phdr): Likewise. (get_program_header_size): Likewise. (_bfd_elf_map_sections_to_segments): Likewise. * bfd/elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Add contents to the .sframe sections or .plt* entries. * bfd/elflink.c (elf_section_ignore_discarded_relocs): Handle SEC_INFO_TYPE_SFRAME. (_bfd_elf_default_action_discarded): Handle .sframe section. (elf_link_input_bfd): Merge .sframe section. (bfd_elf_final_link): Write the output .sframe section. (bfd_elf_discard_info): Handle discarding .sframe section. * bfd/elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Create .sframe section for .plt and .plt.sec. (_bfd_x86_elf_finish_dynamic_sections): Handle .sframe from .plt* sections. * bfd/elfxx-x86.h (PLT_SFRAME_FDE_START_OFFSET): New definition. (SFRAME_PLT0_MAX_NUM_FRES): Likewise. (SFRAME_PLTN_MAX_NUM_FRES): Likewise. (struct elf_x86_sframe_plt): New structure. (struct elf_x86_link_hash_table): New member. (struct elf_x86_init_table): New members for .sframe creation. * bfd/section.c: Add new definition SEC_INFO_TYPE_SFRAME. * binutils/readelf.c (get_segment_type): Handle new segment PT_GNU_SFRAME. * ld/ld.texi: Update documentation for --no-ld-generated-unwind-info. * ld/scripttempl/elf.sc: Support .sframe sections. * ld/Makefile.am (TESTSFRAMELIB): Use it. (check-DEJAGNU): Likewise. * ld/Makefile.in: Regenerated. * ld/configure.ac (TESTSFRAMELIB): Set to the .so or .a like TESTBFDLIB. * ld/configure: Regenerated. * bfd/elf-sframe.c: New file. include/ChangeLog: * elf/common.h (PT_GNU_SFRAME): New definition. * elf/internal.h (struct elf_segment_map): Handle new segment type PT_GNU_SFRAME. ld/testsuite/ChangeLog: * ld/testsuite/ld-bootstrap/bootstrap.exp: Add SFRAMELIB. * ld/testsuite/ld-aarch64/aarch64-elf.exp: Add new test sframe-simple-1. * ld/testsuite/ld-aarch64/sframe-bar.s: New file. * ld/testsuite/ld-aarch64/sframe-foo.s: Likewise. * ld/testsuite/ld-aarch64/sframe-simple-1.d: Likewise. * ld/testsuite/ld-sframe/sframe-empty.d: New test. * ld/testsuite/ld-sframe/sframe-empty.s: New file. * ld/testsuite/ld-sframe/sframe.exp: New testsuite. * ld/testsuite/ld-x86-64/sframe-bar.s: New file. * ld/testsuite/ld-x86-64/sframe-foo.s: Likewise. * ld/testsuite/ld-x86-64/sframe-simple-1.d: Likewise. * ld/testsuite/ld-x86-64/sframe-plt-1.d: Likewise. * ld/testsuite/ld-x86-64/sframe-simple-1.d: Likewise. * ld/testsuite/ld-x86-64/x86-64.exp: Add new tests - sframe-simple-1, sframe-plt-1. * ld/testsuite/lib/ld-lib.exp: Add new proc to check if assembler supports SFrame section. * ld/testsuite/ld-sframe/discard.d: New file. * ld/testsuite/ld-sframe/discard.ld: Likewise. * ld/testsuite/ld-sframe/discard.s: Likewise.
* configure: require libzstd >= 1.4.0Christophe Lyon2022-11-071-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | gas uses ZSTD_compressStream2 which is only available with libzstd >= 1.4.0, leading to build errors when an older version is installed. This patch updates the check libzstd presence to check its version is >= 1.4.0. However, since gas seems to be the only component requiring such a recent version this may imply that we disable ZSTD support for all components although some would still benefit from an older version. I ran 'autoreconf -f' in all directories containing a configure.ac file, using vanilla autoconf-2.69 and automake-1.15.1. I noticed several errors from autoheader in readline, as well as warnings in intl, but they are unrelated to this patch. This should fix some of the buildbots. OK for trunk? Thanks, Christophe
* add --enable-default-compressed-debug-sections-algorithm configure optionMartin Liska2022-10-111-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | ChangeLog: * configure.ac: Add --enable-default-compressed-debug-sections-algorithm. * configure: Regenerate. gas/ChangeLog: * NEWS: Document the new option. * as.c (flag_compress_debug): Set default algorithm based on the configure option. * configure.ac: Add --enable-default-compressed-debug-sections-algorithm. * configure: Regenerate. * config.in: Likewise. ld/ChangeLog: * NEWS: Document the new option. * configure.ac: Add --enable-default-compressed-debug-sections-algorithm. * configure: Regenerate. * config.in: Likewise. * ldmain.c: Set default algorithm based on the configure option.
* binutils, gdb: support zstd compressed debug sectionsFangrui Song2022-09-261-130/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR29397 PR29563: Add new configure option --with-zstd which defaults to auto. If pkgconfig/libzstd.pc is found, define HAVE_ZSTD and support zstd compressed debug sections for most tools. * bfd: for addr2line, objdump --dwarf, gdb, etc * gas: support --compress-debug-sections=zstd * ld: support ELFCOMPRESS_ZSTD input and --compress-debug-sections=zstd * objcopy: support ELFCOMPRESS_ZSTD input for --decompress-debug-sections and --compress-debug-sections=zstd * gdb: support ELFCOMPRESS_ZSTD input. The bfd change references zstd symbols, so gdb has to link against -lzstd in this patch. If zstd is not supported, ELFCOMPRESS_ZSTD input triggers an error. We can avoid HAVE_ZSTD if binutils-gdb imports zstd/ like zlib/, but this is too heavyweight, so don't do it for now. ``` % ld/ld-new a.o ld/ld-new: a.o: section .debug_abbrev is compressed with zstd, but BFD is not built with zstd support ... % ld/ld-new a.o --compress-debug-sections=zstd ld/ld-new: --compress-debug-sections=zstd: ld is not built with zstd support % binutils/objcopy --compress-debug-sections=zstd a.o b.o binutils/objcopy: --compress-debug-sections=zstd: binutils is not built with zstd support % binutils/objcopy b.o --decompress-debug-sections binutils/objcopy: zstd.o: section .debug_abbrev is compressed with zstd, but BFD is not built with zstd support ... ```
* PKG_CHECK_MODULES for msgpack and janssonAlan Modra2022-09-261-14/+3
| | | | | | | | | | | | | | Using AS_IF rather than shell "if" is recommended for conditionals that contain non-trivial autoconf macros, because autoconf will emit any AC_REQUIREd autoconf macro expansions outside of the conditional. This makes them available elsewhere in the configure script. binutils/ * configure.ac (msgpack): Use "AS_IF" rather than "if". * configure: Regenerate. ld/ * configure.ac (jansson): Use "AS_IF" rather than "if". * configure: Regenerate.
* bfd: Stop using -Wstack-usage=262144 when built with ClangTsukasa OI2022-09-141-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some components of GNU Binutils will pass "-Wstack-usage=262144" when "GCC >= 5.0" is detected. However, Clang does not support "-Wstack-usage", despite that related configuration part in bfd/warning.m4 handles the latest Clang (15.0.0 as of this writing) as "GCC >= 5.0". The option "-Wstack-usage" was ignored when the first version of Clang is released but even this "ignoring" behavior is removed before Clang 4.0.0. So, if we give Clang "-Wstack-usage=262144", it generates a warning, making the build failure. This commit checks "__clang__" macro to prevent adding the option if the compiler is identified as Clang. bfd/ChangeLog: * warning.m4: Stop appending "-Wstack-usage=262144" option when compiled with Clang. * configure: Regenerate. binutils/ChangeLog: * configure: Regenerate. gas/ChangeLog: * configure: Regenerate. gold/ChangeLog: * configure: Regenerate. gprof/ChangeLog: * configure: Regenerate. ld/ChangeLog: * configure: Regenerate. opcodes/ChangeLog: * configure: Regenerate.
* PR17122, OSX 10.9 build failureAlan Modra2022-07-221-11/+1
| | | | | | | | | | | | | | | | sbrk hasn't been used in binutils/ or ld/ for quite some time (so the PR was fixed a while ago). Tidy up configury. PR 17122 binutils/ * configure.ac: Don't check for sbrk. * sysdep.h (sbrk): Don't supply fallback declaration. * config.in: Regenerate. * configure: Regenerate. ld/ * configure.ac: Don't check for sbrk. * config.in: Regenerate. * configure: Regenerate.
* Fix regeneration of ld configure and makefilesNick Clifton2022-07-081-118/+103
|
* Update version to 2.39.50 and regenerate filesNick Clifton2022-07-081-113/+128
|
* Disable execstack and rwx segments warnings for MIPS targets.Nick Clifton2022-06-271-12/+2
| | | | | | | | PR 29263 * configure.ac: Move HPPA specific code from here... * configure.tgt: ... to here. Add similar code for MIPS. Move code for CRIS, MIPS and HPPA to block at start of file. * configure: Regenerate.
* ld: regenerate configure after recent misgenerationNick Alcock2022-06-211-118/+103
| | | | | | | | Things work again after this. ld/ChangeLog: * configure: Regenerate.
* Default to disabling the linker warnings about execstack and RWX segments if ↵Nick Clifton2022-06-211-105/+130
| | | | | | | | | | | | | the target is the HPPA architecture. PR 29263 * configure.ac (ac_default_ld_warn_execstack): Default to 'no' for HPPA targets. (ac_default_ld_warn_rwx_segments): Likewise. * configure: Regenerate. * testsuite/ld-elf/elf.exp: Add the --warn-execstack command line option to the command line when running execstack tests for the HPPA target.
* ld: add --package-metadataLuca Boccassi2022-05-261-2/+268
| | | | | | | | | | | | Generate a .note.package FDO package metadata ELF note, following the spec: https://systemd.io/ELF_PACKAGE_METADATA/ If the jansson library is available at build time (and it is explicitly enabled), link ld to it, and use it to validate that the input is correct JSON, to avoid writing garbage to the file. The configure option --enable-jansson has to be used to explicitly enable it (error out when not found). This allows bootstrappers (or others who are not interested) to seamlessly skip it without issues.
* Tidy warn-execstack handlingAlan Modra2022-05-201-5/+4
| | | | | | | | | | | | | | | | | | | | | | | Make ld and bfd values consistent by swapping values 0 and 2 in link_info.warn_execstack. This has the benefit of making the value an "extended" boolean, with 0 meaning no warning, 1 meaning warn, other values a conditional warning. Yes, this patch introduces fails on arm/aarch64. Not a problem with this patch but an arm/aarch64 before_parse problem. bfd/ * elflink.c (bfd_elf_size_dynamic_sections): Adjust warn_execstack test. include/ * bfdlink.h (warn_execstack): Swap 0 and 2 meaning. ld/ * configure.ac (DEFAULT_LD_WARN_EXECSTACK): Use values of 0, 1, 2 consistent with link_info.warn_execstack. * ld.texi: Typo fixes. * lexsup.c (parse_args): Adjust setting of link_info.warn_execstack. (elf_static_list_options): Adjust help message conditions. * configure: Regenerate.
* Add a linker warning when creating potentially dangerous executable ↵Nick Clifton2022-05-031-2/+73
| | | | segments. Add tests, options to disabke and configure switches to choose defaults.
* libtool.m4: fix the NM="/nm/over/here -B/option/with/path" caseNick Alcock2022-03-251-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | My previous nm patch handled all cases but one -- if the user set NM in the environment to a path which contained an option, libtool's nm detection tries to run nm against a copy of nm with the options in it: e.g. if NM was set to "nm --blargle", and nm was found in /usr/bin, the test would try to run "/usr/bin/nm --blargle /usr/bin/nm --blargle". This is unlikely to be desirable: in this case we should run "/usr/bin/nm --blargle /usr/bin/nm". Furthermore, as part of this nm has to detect when the passed-in $NM contains a path, and in that case avoid doing a path search itself. This too was thrown off if an option contained something that looked like a path, e.g. NM="nm -B../prev-gcc"; libtool then tries to run "nm -B../prev-gcc nm" which rarely works well (and indeed it looks to see whether that nm exists, finds it doesn't, and wrongly concludes that nm -p or whatever does not work). Fix all of these by clipping all options (defined as everything including and after the first " -") before deciding whether nm contains a path (but not using the clipped value for anything else), and then removing all options from the path-modified nm before looking to see whether that nm existed. NM=my-nm now does a path search and runs e.g. /usr/bin/my-nm -B /usr/bin/my-nm NM=/usr/bin/my-nm now avoids a path search and runs e.g. /usr/bin/my-nm -B /usr/bin/my-nm NM="my-nm -p../wombat" now does a path search and runs e.g. /usr/bin/my-nm -p../wombat -B /usr/bin/my-nm NM="../prev-binutils/new-nm -B../prev-gcc" now avoids a path search: ../prev-binutils/my-nm -B../prev-gcc -B ../prev-binutils/my-nm This seems to be all combinations, including those used by GCC bootstrap (which, before this commit, fails to bootstrap when configured --with-build-config=bootstrap-lto, because the lto plugin is now using --export-symbols-regex, which requires libtool to find a working nm, while also using -B../prev-gcc to point at the lto plugin associated with the GCC just built.) Regenerate all affected configure scripts. * libtool.m4 (LT_PATH_NM): Handle user-specified NM with options, including options containing paths.
* Regenerate configure files with autoconf 2.69H.J. Lu2022-01-231-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regenerate configure files with the unmodified autoconf 2.69 to remove --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] bfd/ * configure: Regenerate. binutils/ * configure: Regenerate. gas/ * configure: Regenerate. gold/ * configure: Regenerate. gprof/ * configure: Regenerate. ld/ * configure: Regenerate. opcodes/ * configure: Regenerate.
* Change version number to 2.38.50 and regenerate filesNick Clifton2022-01-221-13/+25
|
* unify 64-bit bfd checksMike Frysinger2022-01-011-97/+117
| | | | | | | | Move the 64-bit bfd logic out of bfd/configure.ac and into bfd64.m4 under config so it can be shared between all the other subdirs. This replaces want64 with enable_64_bit_bfd which was already being declared, but not used directly.
* ld: enable silent build rulesMike Frysinger2021-11-291-2/+41
| | | | Also add $(AM_V_xxx) to various manual rules in here.
* configure: regenerate in all projects that use libtool.m4Nick Alcock2021-09-271-45/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (including sim/, which has no changelog.) bfd/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. binutils/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. gas/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. gprof/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. ld/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. libctf/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. * Makefile.in: Regenerate. opcodes/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. zlib/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate.
* Add support for the haiku operating system. These are the os support ↵Alexander von Gluck IV2021-09-021-2/+2
| | | | patches we have been grooming and maintaining for quite a few years over on git.haiku-os.org. All of these architectures are working and most have been stable for quite some time.
* Update version number and regenerate filesNick Clifton2021-07-031-10/+10
|
* ENABLE_CHECKING in bfd, opcodes, binutils, ldAlan Modra2021-04-131-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | gas already has this. Here it enables checking hash table type passed to elf_link_hash_lookup and elf_link_hash_traverse. bfd/ * elf-bfd.h (ENABLE_CHECKING): Define. (elf_link_hash_lookup): Abort if wrong type of hash table. (elf_link_hash_traverse): Likewise. * configure.ac (--enable-checking): Add support. * config.in: Regenerate. * configure: Regenerate. binutils/ * configure.ac (--enable-checking): Add support. * config.in: Regenerate. * configure: Regenerate. ld/ * configure.ac (--enable-checking): Add support. * config.in: Regenerate. * configure: Regenerate. opcodes/ * configure.ac (--enable-checking): Add support. * config.in: Regenerate. * configure: Regenerate.
* C99 ld configuryAlan Modra2021-04-051-1466/+575
| | | | | | | | | | | | | | | * configure.ac: Move initfini-array arg handling earlier. Don't check for string.h, strings.h, stdlib.h, or locale.h. Do check for inttypes.h, stdint.h, sys/types.h. Don't check for setlocale, free, getev or strstr. (AC_ISC_POSIX): Don't invoke. * sysdep.h: Include string.h and stdlib.h unconditionally. Test HAVE_SYS_TYPE_H and HAVE_SYS_STAT_H. Remove strstr, free and getenv fallback declarations. * ld.h: Don't test HAVE_LOCALE_H. * ldmain.c: Don't test HAVE_SETLOCALE. * config.in: Regenerate. * configure: Regenerate.
* Use bool in ldAlan Modra2021-03-311-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sysdep.h (POISON_BFD_BOOLEAN): Define. * configure.ac (elf_list_options, elf_shlib_list_options=false), (elf_plt_unwind_list_options=false): Replace FALSE with false, and TRUE with true. * emulparams/call_nop.sh, * emulparams/cet.sh, * emulparams/dynamic_undefined_weak.sh, * emulparams/elf32b4300.sh, * emulparams/elf32lm32.sh, * emulparams/elf32lr5900.sh, * emulparams/elf32lr5900n32.sh, * emulparams/elf32visium.sh, * emulparams/elf_x86_64.sh, * emulparams/extern_protected_data.sh, * emulparams/plt_unwind.sh, * emulparams/reloc_overflow.sh, * emulparams/static.sh, * emulparams/x86-64-lam.sh, * emultempl/aarch64elf.em, * emultempl/aix.em, * emultempl/alphaelf.em, * emultempl/armcoff.em, * emultempl/armelf.em, * emultempl/avrelf.em, * emultempl/beos.em, * emultempl/bfin.em, * emultempl/cr16elf.em, * emultempl/crxelf.em, * emultempl/cskyelf.em, * emultempl/elf.em, * emultempl/genelf.em, * emultempl/hppaelf.em, * emultempl/linux.em, * emultempl/m68hc1xelf.em, * emultempl/metagelf.em, * emultempl/mipself.em, * emultempl/mmix-elfnmmo.em, * emultempl/mmixelf.em, * emultempl/mmo.em, * emultempl/msp430.em, * emultempl/nios2elf.em, * emultempl/pdp11.em, * emultempl/pe.em, * emultempl/pep.em, * emultempl/ppc32elf.em, * emultempl/ppc64elf.em, * emultempl/rxelf.em, * emultempl/rxlinux.em, * emultempl/scoreelf.em, * emultempl/solaris2.em, * emultempl/spuelf.em, * emultempl/ticoff.em, * emultempl/v850elf.em, * emultempl/vms.em, * emultempl/xtensaelf.em, * emultempl/z80.em, * ld.h, * ldbuildid.c, * ldbuildid.h, * ldcref.c, * ldctor.c, * ldctor.h, * ldelf.c, * ldelf.h, * ldelfgen.c, * ldelfgen.h, * ldemul.c, * ldemul.h, * ldexp.c, * ldexp.h, * ldfile.c, * ldfile.h, * ldgram.y, * ldlang.c, * ldlang.h, * ldmain.c, * ldmain.h, * ldmisc.c, * ldmisc.h, * ldwrite.c, * lexsup.c, * mri.c, * pe-dll.c, * pe-dll.h, * pep-dll.h, * plugin.c, * plugin.h, * testplug.c, * testplug2.c, * testplug3.c, * testplug4.c: Replace bfd_boolean with bool, FALSE with false, and TRUE with true. * configure: Regenerate.
* Implement a workaround for GNU mak jobserverH.J. Lu2021-01-121-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compiling binutils using -flto=jobserver with GCC 11 leads to libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Wwrite-strings -I../../gas/../zlib -g -O2 -fprofile-generate -flto=jobserver -o as-new app.o as.o atof-generic.o compress-debug.o cond.o depend.o dwarf2dbg.o dw2gencfi.o ecoff.o ehopt.o expr.o flonum-copy.o flonum-konst.o flonum-mult.o frags.o hash.o input-file.o input-scrub.o listing.o literal.o macro.o messages.o output-file.o read.o remap.o sb.o stabs.o subsegs.o symbols.o write.o config/tc-i386.o config/obj-elf.o config/atof-ieee.o ../opcodes/.libs/libopcodes.a ../bfd/.libs/libbfd.a -L/tmp/binutils-gdb/objdir/zlib -lz ../libiberty/libiberty.a -ldl lto-wrapper: warning: jobserver is not available: '--jobserver-auth=' is not present in 'MAKEFLAGS' since the '+' is missing on the recipe line in Makefiles generated by automake. Add the '+' to the recipe line by hand. bfd/ PR binutils/26792 * configure.ac: Use GNU_MAKE_JOBSERVER. * aclocal.m4: Regenerated. * configure: Likewise. binutils/ PR binutils/26792 * configure.ac: Use GNU_MAKE_JOBSERVER. * aclocal.m4: Regenerated. * configure: Likewise. config/ PR binutils/26792 * jobserver.m4: New file. gas/ PR binutils/26792 * configure.ac: Use GNU_MAKE_JOBSERVER. * aclocal.m4: Regenerated. * configure: Likewise. gprof/ PR binutils/26792 * configure.ac: Use GNU_MAKE_JOBSERVER. * aclocal.m4: Regenerated. * configure: Likewise. ld/ PR binutils/26792 * configure.ac: Use GNU_MAKE_JOBSERVER. * aclocal.m4: Regenerated. * configure: Likewise. libctf/ PR binutils/26792 * configure.ac: Use GNU_MAKE_JOBSERVER. * aclocal.m4: Regenerated. * configure: Likewise. opcodes/ PR binutils/26792 * configure.ac: Use GNU_MAKE_JOBSERVER. * aclocal.m4: Regenerated. * configure: Likewise.
* Binutils: Check if AR works with --plugin and rcH.J. Lu2021-01-111-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check if AR works with --plugin and rc before passing --plugin to AR and RANLIB. bfd/ PR ld/27173 binutils/ PR ld/27173 * configure: Regenerated. gas/ PR ld/27173 * configure: Regenerated. gprof/ PR ld/27173 * configure: Regenerated. ld/ PR ld/27173 * configure: Regenerated. libctf/ PR ld/27173 * configure: Regenerated. opcodes/ PR ld/27173 * configure: Regenerated.
* Binutils: Pass --plugin to AR and RANLIBH.J. Lu2021-01-091-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detect GCC LTO plugin. Pass --plugin to AR and RANLIB to support LTO build. bfd/ * configure: Regenerated. binutils/ * configure: Regenerated. gas/ * configure: Regenerated. gprof/ * configure: Regenerated. ld/ * configure: Regenerated. libctf/ * configure: Regenerated. opcodes/ * configure: Regenerated.
* Change version number to 2.36.50 and regenerate filesNick Clifton2021-01-091-10/+10
|
* configure regenAlan Modra2021-01-091-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | commit f478212851 did the regen by hand, missed a change in ld/configure and didn't update line numbers. Fix that, and an old regen of ld/Makefile.in with the wrong automake. bfd/ * configure: Regenerate. binutils/ * configure: Regenerate. gas/ * configure: Regenerate. gprof/ * configure: Regenerate. ld/ * Makefile.in: Regenerate. * configure: Regenerate. libctf/ * configure: Regenerate. opcodes/ * configure: Regenerate. zlib/ * configure: Regenerate.
* libtool.m4: update GNU/Hurd test from upstream. In upstream libtool, ↵Samuel Thibault2021-01-071-11/+1
| | | | | | | | | | 47a889a4ca20 ("Improve GNU/Hurd support.") fixed detection of shlibpath_overrides_runpath, thus avoiding unnecessary relink. This backports it. . * libtool.m4: Match gnu* along other GNU systems. */ChangeLog: * configure: Re-generate.
* Add a new option to the linker: --error-handling-script=<NAME>. Run the ↵Nick Clifton2020-10-161-2/+26
| | | | | | | | | | | | | | | | | | | | | script <NAME> if an undefined symbol or unfound library error is encountered. PR 26626 * ldmain.c (undefined_symbol): If an error handlign script is available, call it. * ldfile.c (error_handling_script): Declare. (ldfile_open_file): If a library cannot be found and an error handling script is available, call it. * ldmain.h (error_handling_script): Prototype. * ldlex.h (OPTION_ERROR_HANDLING_SCRIPT): Define. * lexsup.c (ld_options): Add --error-handling-script. (parse_args): Add support for --errror-handling-script. * ld.texi: Document the new feature. * configure.ac: Add --error-handling-script option to disable support for the new feature. * NEWS: Mention the new feature. * config.in: Regenerate. * configure: Regenerate.
* PR26328, Compilation warning when building ld v2.35 with MinGWAlan Modra2020-08-031-12/+22
| | | | | | | PR 26328 * configure.ac: AC_CHECK_DECLS asprintf. * configure: Regenerate. * config.in: Regenerate.
* Unify Solaris procfs and largefile handlingRainer Orth2020-07-301-11/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GDB currently doesn't build on 32-bit Solaris: * On Solaris 11.4/x86: In file included from /usr/include/sys/procfs.h:26, from /vol/src/gnu/gdb/hg/master/dist/gdb/i386-sol2-nat.c:24: /usr/include/sys/old_procfs.h:31:2: error: #error "Cannot use procfs in the large file compilation environment" #error "Cannot use procfs in the large file compilation environment" ^~~~~ * On Solaris 11.3/x86 there are several more instances of this. The interaction between procfs and large-file support historically has been a royal mess on Solaris: * There are two versions of the procfs interface: ** The old ioctl-based /proc, deprecated and not used any longer in either gdb or binutils. ** The `new' (introduced in Solaris 2.6, 1997) structured /proc. * There are two headers one can possibly include: ** <procfs.h> which only provides the structured /proc, definining _STRUCTURED_PROC=1 and then including ... ** <sys/procfs.h> which defaults to _STRUCTURED_PROC=0, the ioctl-based /proc, but provides structured /proc if _STRUCTURED_PROC == 1. * procfs and the large-file environment didn't go well together: ** Until Solaris 11.3, <sys/procfs.h> would always #error in 32-bit compilations when the large-file environment was active (_FILE_OFFSET_BITS == 64). ** In both Solaris 11.4 and Illumos, this restriction was lifted for structured /proc. So one has to be careful always to define _STRUCTURED_PROC=1 when testing for or using <sys/procfs.h> on Solaris. As the errors above show, this isn't always the case in binutils-gdb right now. Also one may need to disable large-file support for 32-bit compilations on Solaris. config/largefile.m4 meant to do this by wrapping the AC_SYS_LARGEFILE autoconf macro with appropriate checks, yielding ACX_LARGEFILE. Unfortunately the macro doesn't always succeed because it neglects the _STRUCTURED_PROC part. To make things even worse, since GCC 9 g++ predefines _FILE_OFFSET_BITS=64 on Solaris. So even if largefile.m4 deciced not to enable large-file support, this has no effect, breaking the gdb build. This patch addresses all this as follows: * All tests for the <sys/procfs.h> header are made with _STRUCTURED_PROC=1, the definition going into the various config.h files instead of having to make them (and sometimes failing) in the affected sources. * To cope with the g++ predefine of _FILE_OFFSET_BITS=64, -U_FILE_OFFSET_BITS is added to various *_CPPFLAGS variables. It had been far easier to have just #undef _FILE_OFFSET_BITS in config.h, but unfortunately such a construct in config.in is commented by config.status irrespective of indentation and whitespace if large-file support is disabled. I found no way around this and putting the #undef in several global headers for bfd, binutils, ld, and gdb seemed way more invasive. * Last, the applicability check in largefile.m4 was modified only to disable largefile support if really needed. To do so, it checks if <sys/procfs.h> compiles with _FILE_OFFSET_BITS=64 defined. If it doesn't, the disabling only happens if gdb exists in-tree and isn't disabled, otherwise (building binutils from a tarball), there's no conflict. What initially confused me was the check for $plugins here, which originally caused the disabling not to take place. Since AC_PLUGINGS does enable plugin support if <dlfcn.h> exists (which it does on Solaris), the disabling never happened. I could find no explanation why the linker plugin needs large-file support but thought it would be enough if gld and GCC's lto-plugin agreed on the _FILE_OFFSET_BITS value. Unfortunately, that's not enough: lto-plugin uses the simple-object interface from libiberty, which includes off_t arguments. So to fully disable large-file support would mean also disabling it in libiberty and its users: gcc and libstdc++-v3. This seems highly undesirable, so I decided to disable the linker plugin instead if large-file support won't work. The patch allows binutils+gdb to build on i386-pc-solaris2.11 (both Solaris 11.3 and 11.4, using GCC 9.3.0 which is the worst case due to predefined _FILE_OFFSET_BITS=64). Also regtested on amd64-pc-solaris2.11 (again on Solaris 11.3 and 11.4), x86_64-pc-linux-gnu and i686-pc-linux-gnu. config: * largefile.m4 (ACX_LARGEFILE) <sparc-*-solaris*|i?86-*-solaris*>: Check for <sys/procfs.h> incompatilibity with large-file support on Solaris. Only disable large-file support and perhaps plugins if needed. Set, substitute LARGEFILE_CPPFLAGS if so. bfd: * bfd.m4 (BFD_SYS_PROCFS_H): New macro. (BFD_HAVE_SYS_PROCFS_TYPE): Require BFD_SYS_PROCFS_H. Don't define _STRUCTURED_PROC. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise. * elf.c [HAVE_SYS_PROCFS_H] (_STRUCTURED_PROC): Don't define. * configure.ac: Use BFD_SYS_PROCFS_H to check for <sys/procfs.h>. * configure, config.in: Regenerate. * Makefile.am (AM_CPPFLAGS): Add LARGEFILE_CPPFLAGS. * Makefile.in, doc/Makefile.in: Regenerate. binutils: * Makefile.am (AM_CPPFLAGS): Add LARGEFILE_CPPFLAGS. * Makefile.in, doc/Makefile.in: Regenerate. * configure: Regenerate. gas: * Makefile.am (AM_CPPFLAGS): Add LARGEFILE_CPPFLAGS. * Makefile.in, doc/Makefile.in: Regenerate. * configure: Regenerate. gdb: * proc-api.c (_STRUCTURED_PROC): Don't define. * proc-events.c: Likewise. * proc-flags.c: Likewise. * proc-why.c: Likewise. * procfs.c: Likewise. * Makefile.in (INTERNAL_CPPFLAGS): Add LARGEFILE_CPPFLAGS. * configure, config.in: Regenerate. gdbserver: * configure, config.in: Regenerate. gdbsupport: * Makefile.am (AM_CPPFLAGS): Add LARGEFILE_CPPFLAGS. * common.m4 (GDB_AC_COMMON): Use BFD_SYS_PROCFS_H to check for <sys/procfs.h>. * Makefile.in: Regenerate. * configure, config.in: Regenerate. gnulib: * configure.ac: Run ACX_LARGEFILE before gl_EARLY. * configure: Regenerate. gprof: * Makefile.am (AM_CPPFLAGS): Add LARGEFILE_CPPFLAGS. * Makefile.in: Regenerate. * configure: Regenerate. ld: * Makefile.am (AM_CPPFLAGS): Add LARGEFILE_CPPFLAGS. * Makefile.in: Regenerate. * configure: Regenerate.
* ld, testsuite: only run CTF tests when ld and GCC support CTFNick Alcock2020-07-221-2/+4
| | | | | | | | | | | | | | | | | | | The CTF testsuite runs GCC to generate CTF that it knows matches the input .c files before doing a run_dump_test over it. So we need a GCC capable of doing that, and we need to always avoid running those tests if libctf was disabled because the linker will never be capable of it. ld/ * configure.ac (enable_libctf): Substitute it. * Makefile.am (enablings.exp): New. (EXTRA_DEJAGNU_SITE_CONFIG): Add it. (DISTCLEANFILES): Likewise. * Makefile.in: Regenerate. * configure: Likewise. * testsuite/lib/ld-lib.exp (compile_one_cc): New. (check_ctf_available): Likewise. (skip_ctf_tests): Likewise. * testsuite/ld-ctf/ctf.exp: Call skip_ctf_tests.
* Update version to 2.35.50 and regenerate filesNick Clifton2020-07-041-10/+10
|
* binutils, ld: work with --disable-libctfNick Alcock2020-06-261-2/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This unfortunately means conditionalizing out all the libctf code, but the result is not too unbearably ugly, if a bit repetitive. I have stubbed out code in the !ENABLE_LIBCTF path to avoid extra redundant ifdefs where it seems that might be helpful. (The stubs are not too disruptive, but I've tried to keep them on one line where possible to avoid filling up the screen with stubs that nobody would care about. If this is too much of a coding style violation I can change it.) Changes since v2: use GCC_ENABLE rather than repeating all the AC_ARG_ENABLE stuff over and over again. ld/ * configure.ac [--enable-libctf]: New, default yes. Set ENABLE_LIBCTF accordingly. * Makefile.am [!ENABLE_LIBCTF]: Empty LIBCTF. * configure: Regenerate. * config.in: Regenerate. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * ldlang.c (ctf_output): Conditionalize on ENABLE_LIBCTF. (ldlang_open_ctf): Likewise. (lang_merge_ctf): Likewise. (ldlang_ctf_apply_strsym): Likewise. (lang_write_ctf): Likewise. (ldlang_write_ctf_late): Likewise. (ldlang_open_ctf) [!ENABLE_LIBCTF]: Warn about the presence of CTF sections. (lang_merge_ctf) [!ENABLE_LIBCTF]: New stub. (ldlang_ctf_apply_strsym) [!ENABLE_LIBCTF]: Likewise. (lang_write_ctf) [!ENABLE_LIBCTF]: Likewise. (ldlang_write_ctf_late) [!ENABLE_LIBCTF]: Likewise. * ldelfgen.c (ldelf_emit_ctf_early): Conditionalize on ENABLE_LIBCTF. (struct ctf_strsym_iter_cb_arg): Likewise. (ldelf_ctf_strtab_iter_cb): Likewise. (ldelf_ctf_symbols_iter_cb): Likewise. (ldelf_examine_strtab_for_ctf): Likewise. (ldelf_emit_ctf_early) [!ENABLE_LIBCTF]: New stub. (ldelf_examine_strtab_for_ctf) [!ENABLE_LIBCTF]: New stub. binutils/ * configure.ac [--enable-libctf]: New, default yes. Set ENABLE_LIBCTF accordingly. * Makefile.am [!ENABLE_LIBCTF]: Empty LIBCTF and LIBCTF_NOBFD. * configure: Regenerate. * config.in: Regenerate. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * objdump.c (usage): Conditionalize portions on ENABLE_LIBCTF. (option_values): Likewise. (long_options): Likewise. (main): Likewise. (dump_ctf_indent_lines): Conditionalize out when !ENABLE_LIBCTF. (make_ctfsect): Likewise. (dump_ctf_archive_member): Likewise. (dump_ctf) [ENABLE_LIBCTF]: Likewise. (dump_ctf) [!ENABLE_LIBCTF]: New empty stub. * readelf.c (options): Conditionalize portions on ENABLE_LIBCTF. (usage): Likewise. (process_section_contents): Likewise. (shdr_to_ctf_sect): Conditionalize out when !ENABLE_LIBCTF. (dump_ctf_indent_lines): Likewise. (dump_section_as_ctf) [ENABLE_LIBCTF]: Likewise.
* Do without ld ENABLE_PLUGINSAlan Modra2020-06-211-16/+2
| | | | | | | | | | | | | | | | | | | | | | | Instead, use BFD_SUPPORTS_PLUGINS. * ldfile.c: Replace uses of ENABLE_PLUGINS with BFD_SUPPORTS_PLUGINS. * ldlang.c: Likewise. * ldlang.h: Likewise. * ldlex.h: Likewise. * ldmain.c: Likewise. * lexsup.c: Likewise. * plugin.c: Wrap body of file in #if BFD_SUPPORTS_PLUGINS. * testplug.c: Likewise. * testplug2.c: Likewise. * testplug3.c: Likewise. * testplug4.c: Likewise. * configure.ac (ENABLE_PLUGINS): Don't define AM_CONTITIONAL. * Makefile.am: Remove ENABLE_PLUGINS conditionals. (PLUGIN_CFLAGS): Don't define. (PLUGIN_C, PLUGIN_H, PLUGIN_OBJECT): Likewise. Substitute all uses with plugin file name. * configure: Regenerate. * Makefile.in: Regenerate.
* ld: Add --enable-textrel-check=[no|yes|warning|error]H.J. Lu2020-05-281-2/+39
| | | | | | | | | | | | | | | | | Add a configure option, --enable-textrel-check=[no|yes|warning|error], to decide what ELF linker should do by default with DT_TEXTREL in an executable or shared library. PR ld/20824 * NEWS: Mention --enable-textrel-check=[no|yes|warning|error]. * configure.ac: Add --enable-textrel-check=[no|yes|warning|error]. (DEFAULT_LD_TEXTREL_CHECK): New AC_DEFINE_UNQUOTED. (DEFAULT_LD_TEXTREL_CHECK_WARNING): Likewise. * ldmain.c (main): Initialize link_info.textrel_check to DEFAULT_LD_TEXTREL_CHECK. * lexsup.c (ld_options): Check DEFAULT_LD_TEXTREL_CHECK_WARNING. * config.in: Regenerated. * configure: Likewise.
* Update version to 2.34.50. Regenerate configure and .pot files.Nick Clifton2020-01-181-10/+10
|
* libctf: installable libctf as a shared libraryNick Alcock2019-10-031-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets other programs read and write CTF-format data. Two versioned shared libraries are created: libctf.so and libctf-nobfd.so. They contain identical content except that libctf-nobfd.so contains no references to libbfd and does not implement ctf_open, ctf_fdopen, ctf_bfdopen or ctf_bfdopen_ctfsect, so it can be used by programs that cannot use BFD, like readelf. The soname major version is presently .0 until the linker API stabilizes, when it will flip to .1 and hopefully never change again. New in v3. v4: libtoolize and turn into a pair of shared libraries. Drop --enable-install-ctf: now controlled by --enable-shared and --enable-install-libbfd, like everything else. v5: Add ../bfd to ACLOCAL_AMFLAGS and AC_CONFIG_MACRO_DIR. Fix tabdamage. * Makefile.def (host_modules): libctf is no longer no_install. * Makefile.in: Regenerated. libctf/ * configure.ac (AC_DISABLE_SHARED): New, like opcodes/. (LT_INIT): Likewise. (AM_INSTALL_LIBBFD): Likewise. (dlopen): Note why this is necessary in a comment. (SHARED_LIBADD): Initialize for possibly-PIC libiberty: derived from opcodes/. (SHARED_LDFLAGS): Likewise. (BFD_LIBADD): Likewise, for libbfd. (BFD_DEPENDENCIES): Likewise. (VERSION_FLAGS): Initialize, using a version script if ld supports one, or libtool -export-symbols-regex otherwise. (AC_CONFIG_MACRO_DIR): Add ../BFD. * Makefile.am (ACLOCAL_AMFLAGS): Likewise. (INCDIR): New. (AM_CPPFLAGS): Use $(srcdir), not $(top_srcdir). (noinst_LIBRARIES): Replace with... [INSTALL_LIBBFD] (lib_LTLIBRARIES): This, or... [!INSTALL_LIBBFD] (noinst_LTLIBRARIES): ... this, mentioning new libctf-nobfd.la as well. [INSTALL_LIBCTF] (include_HEADERS): Add the CTF headers. [!INSTALL_LIBCTF] (include_HEADERS): New, empty. (libctf_a_SOURCES): Rename to... (libctf_nobfd_la_SOURCES): ... this, all of libctf other than ctf-open-bfd.c. (libctf_la_SOURCES): Now derived from libctf_nobfd_la_SOURCES, with ctf-open-bfd.c added. (libctf_nobfd_la_LIBADD): New, using @SHARED_LIBADD@. (libctf_la_LIBADD): New, using @BFD_LIBADD@ as well. (libctf_la_DEPENDENCIES): New, using @BFD_DEPENDENCIES@. * Makefile.am [INSTALL_LIBCTF]: Use it. * aclocal.m4: Add ../bfd/acinclude.m4, ../config/acx.m4, and the libtool macros. * libctf.ver: New, everything is version LIBCTF_1.0 currently (even the unstable components). * Makefile.in: Regenerated. * config.h.in: Likewise. * configure: Likewise. binutils/ * Makefile.am (LIBCTF): Mention the .la file. (LIBCTF_NOBFD): New. (readelf_DEPENDENCIES): Use it. (readelf_LDADD): Likewise. * Makefile.in: Regenerated. ld/ * configure.ac (TESTCTFLIB): Set to the .so or .a, like TESTBFDLIB. * Makefile.am (TESTCTFLIB): Use it. (LIBCTF): Use the .la file. (check-DEJAGNU): Use it. * Makefile.in: Regenerated. * configure: Likewise. include/ * ctf-api.h: Note the instability of the ctf_link interfaces.
* bfd, ld: add CTF section linkingNick Alcock2019-10-031-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is quite complicated because the CTF section's contents depend on the final contents of the symtab and strtab, because it has two sections whose contents are shuffled to be in 1:1 correspondence with the symtab, and an internal strtab that gets deduplicated against the ELF strtab (with offsets adjusted to point into the ELF strtab instead). It is also compressed if large enough, so its size depends on its contents! So we cannot construct it as early as most sections: we cannot even *begin* construction until after the symtab and strtab are finalized. Thankfully there is already one section treated similarly: compressed debugging sections: the only differences are that compressed debugging sections have extra handling to deal with their changing name if compressed (CTF sections are always called ".ctf" for now, though we have reserved ".ctf.*" against future use), and that compressed debugging sections have previously-uncompressed content which has to be stashed away for later compression, while CTF sections have no content at all until we generate it (very late). BFD also cannot do the link itself: libctf knows how to do it, and BFD cannot call libctf directly because libctf already depends on bfd for file I/O. So we have to use a pair of callbacks, one, examine_strtab, which allows a caller to examine the symtab and strtab after finalization (called from elf_link_swap_symbols_out(), right before the symtabs are written, and after the strtab has been finalized), and one which actually does the emission (called emit_ctf simply because it is grouped with a bunch of section-specific late-emission function calls at the bottom of bfd_elf_final_link, and a section-specific name seems best for that). emit_ctf is actually called *twice*: once from lang_process if the emulation suggests that this bfd target does not examine the symtab or strtab, and once via a bfd callback if it does. (This means that non-ELF targets still get CTF emitted, even though the late CTF emission stage is never called for them). v2: merged with non-ELF support patch: slight commit message adjustments. v3: do not spend time merging CTF, or crash, if the CTF section is explicitly discarded. Do not try to merge or compress CTF unless linking. v4: add CTF_COMPRESSION_THRESHOLD. Annul the freed input ctf_file_t's after writeout: set SEC_IN_MEMORY on the output contents so a future bfd enhancement knows it could free it. Add SEC_LINKER_CREATED | SEC_KEEP to avoid having to add .ctf to the linker script. Drop now-unnecessary ldlang.h-level elf-bfd.h include and hackery around it. Adapt to elf32.em->elf.em and elf-generic.em->ldelf*.c changes. v5: fix tabdamage. Drop #inclusions in .h files: include in .c files, .em files, and use struct forwards instead. Use bfd_section_is_ctf inline function rather than SECTION_IS_CTF macro. Move a few comments. * Makefile.def (dependencies): all-ld depends on all-libctf. * Makefile.in: Regenerated. include/ * bfdlink.h (elf_strtab_hash): New forward. (elf_sym_strtab): Likewise. (struct bfd_link_callbacks <examine_strtab>): New. (struct bfd_link_callbacks <emit_ctf>): Likewise. bfd/ * elf-bfd.h (bfd_section_is_ctf): New inline function. * elf.c (special_sections_c): Add ".ctf". (assign_file_positions_for_non_load_sections): Note that compressed debugging sections etc are not assigned here. Treat CTF sections like SEC_ELF_COMPRESS sections when is_linker_output: sh_offset -1. (assign_file_positions_except_relocs): Likewise. (find_section_in_list): Note that debugging and CTF sections, as well as reloc sections, are assigned later. (_bfd_elf_assign_file_positions_for_non_load): CTF sections get their size and contents updated. (_bfd_elf_set_section_contents): Skip CTF sections: unlike compressed sections, they have no uncompressed content to copy at this stage. * elflink.c (elf_link_swap_symbols_out): Call the examine_strtab callback right before the strtab is written out. (bfd_elf_final_link): Don't cache the section contents of CTF sections: they are not populated yet. Call the emit_ctf callback right at the end, after all the symbols and strings are flushed out. ld/ * ldlang.h: (struct lang_input_statement_struct): Add the_ctf. (struct elf_sym_strtab): Add forward. (struct elf_strtab_hash): Likewise. (ldlang_ctf_apply_strsym): Declare. (ldlang_write_ctf_late): Likewise. * ldemul.h (ldemul_emit_ctf_early): New. (ldemul_examine_strtab_for_ctf): Likewise. (ld_emulation_xfer_type) <emit_ctf_early>: Likewise. (ld_emulation_xfer_type) <examine_strtab_for_ctf>: Likewise. * ldemul.c (ldemul_emit_ctf_early): New. (ldemul_examine_strtab_for_ctf): Likewise. * ldlang.c: Include ctf-api.h. (CTF_COMPRESSION_THRESHOLD): New. (ctf_output): New. Initialized in... (ldlang_open_ctf): ... this new function. Open all the CTF sections in the input files: mark them non-loaded and empty so as not to copy their contents to the output, but linker-created so the section gets created in the target. (ldlang_merge_ctf): New, merge types via ctf_link_add_ctf and ctf_link. (ldlang_ctf_apply_strsym): New, an examine_strtab callback: wrap ldemul_examine_strtab_for_ctf. (lang_write_ctf): New, write out the CTF section. (ldlang_write_ctf_late): New, late call via bfd's emit_ctf hook. (lang_process): Call ldlang_open_ctf, ldlang_merge_ctf, and lang_write_ctf. * ldmain.c (link_callbacks): Add ldlang_ctf_apply_strsym, ldlang_write_ctf_late. * emultempl/aix.em: Add ctf-api.h. * emultempl/armcoff.em: Likewise. * emultempl/beos.em: Likewise. * emultempl/elf.em: Likewise. * emultempl/generic.em: Likewise. * emultempl/linux.em: Likewise. * emultempl/msp430.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/pep.em: Likewise. * emultempl/ticoff.em: Likewise. * emultempl/vanilla.em: Likewise. * ldcref.c: Likewise. * ldctor.c: Likewise. * ldelf.c: Likewise. * ldelfgen.c: Likewise. * ldemul.c: Likewise. * ldexp.c: Likewise. * ldfile.c: Likewise. * ldgram.c: Likewise. * ldlex.l: Likewise. * ldmain.c: Likewise. * ldmisc.c: Likewise. * ldver.c: Likewise. * ldwrite.c: Likewise. * lexsup.c: Likewise. * mri.c: Likewise. * pe-dll.c: Likewise. * plugin.c: Likewise. * ldelfgen.c (ldelf_emit_ctf_early): New. (ldelf_examine_strtab_for_ctf): tell libctf about the symtab and strtab. (struct ctf_strsym_iter_cb_arg): New, state to do so. (ldelf_ctf_strtab_iter_cb): New: tell libctf about each string in the strtab in turn. (ldelf_ctf_symbols_iter_cb): New, tell libctf about each symbol in the symtab in turn. * ldelfgen.h (struct elf_sym_strtab): Add forward. (struct elf_strtab_hash): Likewise. (struct ctf_file): Likewise. (ldelf_emit_ctf_early): Declare. (ldelf_examine_strtab_for_ctf): Likewise. * emultempl/elf-generic.em (LDEMUL_EMIT_CTF_EARLY): Set it. (LDEMUL_EXAMINE_STRTAB_FOR_CTF): Likewise. * emultempl/aix.em (ld_${EMULATION_NAME}_emulation): Add emit_ctf_early and examine_strtab_for_ctf, NULL by default. * emultempl/armcoff.em (ld_${EMULATION_NAME}_emulation): Likewise. * emultempl/beos.em (ld_${EMULATION_NAME}_emulation): Likewise. * emultempl/elf.em (ld_${EMULATION_NAME}_emulation): Likewise. * emultempl/generic.em (ld_${EMULATION_NAME}_emulation): Likewise. * emultempl/linux.em (ld_${EMULATION_NAME}_emulation): Likewise. * emultempl/msp430.em (ld_${EMULATION_NAME}_emulation): Likewise. * emultempl/pe.em (ld_${EMULATION_NAME}_emulation): Likewise. * emultempl/pep.em (ld_${EMULATION_NAME}_emulation): Likewise. * emultempl/ticoff.em (ld_${EMULATION_NAME}_emulation): Likewise. * emultempl/vanilla.em (ld_vanilla_emulation): Likewise. * Makefile.am: Pull in libctf (and zlib, a transitive requirement for compressed CTF section emission). Pass it on to DejaGNU. * configure.ac: Add AM_ZLIB. * aclocal.m4: Added zlib.m4. * Makefile.in: Regenerated. * testsuite/ld-bootstrap/bootstrap.exp: Use it when relinking ld.
* Re-generate many configure and Makefile.in filesSimon Marchi2019-09-181-22/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I get some spurious changes when running autoconf/automake for various projects in the tree. This is likely because they were generated using distro-patched tools last time. I ran `autoreconf -f` in the various automake projects of the binutils-gdb tree, and this is the result. The tools I am using have been compiled from source, from the upstream release. bfd/ChangeLog: * Makefile.in: Re-generate. * configure: Re-generate. * doc/Makefile.in: Re-generate. binutils/ChangeLog: * Makefile.in: Re-generate. * configure: Re-generate. * doc/Makefile.in: Re-generate. gas/ChangeLog: * Makefile.in: Re-generate. * configure: Re-generate. * doc/Makefile.in: Re-generate. gold/ChangeLog: * testsuite/Makefile.in: Re-generate. gprof/ChangeLog: * Makefile.in: Re-generate. * configure: Re-generate. ld/ChangeLog: * Makefile.in: Re-generate. * configure: Re-generate. opcodes/ChangeLog: * Makefile.in: Re-generate. * configure: Re-generate.
* Update version to 2.33.50 and regenerate configure scripts.Phil Blundell2019-09-161-18/+32
|
* Rename elf32.em to elf.emAlan Modra2019-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * emultempl/elf32.em: Remove "misnamed" comment. Rename to.. * emultempl/elf.em: ..this. * configure.ac (elf_list_options): Adjust TEMPLATE_NAME grep. * emulparams/aarch64cloudabi.sh (TEMPLATE_NAME): Set to elf. * emulparams/aarch64elf.sh: Likewise. * emulparams/aarch64elf32.sh: Likewise. * emulparams/aarch64fbsd.sh: Likewise. * emulparams/aarch64linux.sh: Likewise. * emulparams/aarch64linux32.sh: Likewise. * emulparams/arcelf.sh: Likewise. * emulparams/arcelf_prof.sh: Likewise. * emulparams/arclinux.sh: Likewise. * emulparams/arclinux_prof.sh: Likewise. * emulparams/arcv2elf.sh: Likewise. * emulparams/arcv2elfx.sh: Likewise. * emulparams/armelf.sh: Likewise. * emulparams/armelf_fuchsia.sh: Likewise. * emulparams/armelf_linux.sh: Likewise. * emulparams/armelf_phoenix.sh: Likewise. * emulparams/armnto.sh: Likewise. * emulparams/avr1.sh: Likewise. * emulparams/avr2.sh: Likewise. * emulparams/avr25.sh: Likewise. * emulparams/avr3.sh: Likewise. * emulparams/avr31.sh: Likewise. * emulparams/avr35.sh: Likewise. * emulparams/avr4.sh: Likewise. * emulparams/avr5.sh: Likewise. * emulparams/avr51.sh: Likewise. * emulparams/avr6.sh: Likewise. * emulparams/avrtiny.sh: Likewise. * emulparams/avrxmega1.sh: Likewise. * emulparams/avrxmega2.sh: Likewise. * emulparams/avrxmega3.sh: Likewise. * emulparams/avrxmega4.sh: Likewise. * emulparams/avrxmega5.sh: Likewise. * emulparams/avrxmega6.sh: Likewise. * emulparams/avrxmega7.sh: Likewise. * emulparams/criself.sh: Likewise. * emulparams/crislinux.sh: Likewise. * emulparams/cskyelf.sh: Likewise. * emulparams/d10velf.sh: Likewise. * emulparams/elf32_sparc.sh: Likewise. * emulparams/elf32_spu.sh: Likewise. * emulparams/elf32_tic6x_le.sh: Likewise. * emulparams/elf32_x86_64.sh: Likewise. * emulparams/elf32am33lin.sh: Likewise. * emulparams/elf32bfin.sh: Likewise. * emulparams/elf32bfinfd.sh: Likewise. * emulparams/elf32bmip.sh: Likewise. * emulparams/elf32bmipn32-defs.sh: Likewise. * emulparams/elf32cr16.sh: Likewise. * emulparams/elf32cr16c.sh: Likewise. * emulparams/elf32crx.sh: Likewise. * emulparams/elf32epiphany.sh: Likewise. * emulparams/elf32epiphany_4x4.sh: Likewise. * emulparams/elf32frvfd.sh: Likewise. * emulparams/elf32ip2k.sh: Likewise. * emulparams/elf32lm32.sh: Likewise. * emulparams/elf32lm32fd.sh: Likewise. * emulparams/elf32lriscv-defs.sh: Likewise. * emulparams/elf32m32c.sh: Likewise. * emulparams/elf32mb_linux.sh: Likewise. * emulparams/elf32mbel_linux.sh: Likewise. * emulparams/elf32mcore.sh: Likewise. * emulparams/elf32mep.sh: Likewise. * emulparams/elf32metag.sh: Likewise. * emulparams/elf32microblaze.sh: Likewise. * emulparams/elf32mipswindiss.sh: Likewise. * emulparams/elf32or1k.sh: Likewise. * emulparams/elf32ppccommon.sh: Likewise. * emulparams/elf32rl78.sh: Likewise. * emulparams/elf32rx.sh: Likewise. * emulparams/elf32tilegx.sh: Likewise. * emulparams/elf32tilepro.sh: Likewise. * emulparams/elf32vax.sh: Likewise. * emulparams/elf32visium.sh: Likewise. * emulparams/elf32xc16x.sh: Likewise. * emulparams/elf32xc16xl.sh: Likewise. * emulparams/elf32xc16xs.sh: Likewise. * emulparams/elf32xstormy16.sh: Likewise. * emulparams/elf32xtensa.sh: Likewise. * emulparams/elf64_aix.sh: Likewise. * emulparams/elf64_ia64.sh: Likewise. * emulparams/elf64_s390.sh: Likewise. * emulparams/elf64_sparc.sh: Likewise. * emulparams/elf64alpha.sh: Likewise. * emulparams/elf64bpf.sh: Likewise. * emulparams/elf64hppa.sh: Likewise. * emulparams/elf64mmix.sh: Likewise. * emulparams/elf64rdos.sh: Likewise. * emulparams/elf64tilegx.sh: Likewise. * emulparams/elf_i386.sh: Likewise. * emulparams/elf_i386_be.sh: Likewise. * emulparams/elf_i386_ldso.sh: Likewise. * emulparams/elf_i386_vxworks.sh: Likewise. * emulparams/elf_iamcu.sh: Likewise. * emulparams/elf_k1om.sh: Likewise. * emulparams/elf_l1om.sh: Likewise. * emulparams/elf_s390.sh: Likewise. * emulparams/elf_x86_64.sh: Likewise. * emulparams/h8300elf.sh: Likewise. * emulparams/h8300elf_linux.sh: Likewise. * emulparams/hppa64linux.sh: Likewise. * emulparams/hppaelf.sh: Likewise. * emulparams/hppalinux.sh: Likewise. * emulparams/i386lynx.sh: Likewise. * emulparams/i386moss.sh: Likewise. * emulparams/i386nto.sh: Likewise. * emulparams/m32relf.sh: Likewise. * emulparams/m32relf_linux.sh: Likewise. * emulparams/m68hc11elf.sh: Likewise. * emulparams/m68hc11elfb.sh: Likewise. * emulparams/m68hc12elf.sh: Likewise. * emulparams/m68hc12elfb.sh: Likewise. * emulparams/m68kelf.sh: Likewise. * emulparams/mn10300.sh: Likewise. * emulparams/nds32elf.sh: Likewise. * emulparams/nds32elf16m.sh: Likewise. * emulparams/nds32elf_linux.sh: Likewise. * emulparams/nios2elf.sh: Likewise. * emulparams/nios2linux.sh: Likewise. * emulparams/pruelf.sh: Likewise. * emulparams/score3_elf.sh: Likewise. * emulparams/shelf.sh: Likewise. * emulparams/shelf_nto.sh: Likewise. * emulparams/shelf_vxworks.sh: Likewise. * emulparams/shlelf_linux.sh: Likewise. * emulparams/shlelf_nto.sh: Likewise. * emulparams/v850.sh: Likewise. * emulparams/v850_rh850.sh: Likewise. * ldelf.c: Update comment. * ldelf.h: Likewise. * emultempl/aarch64elf.em: Likewise. * emultempl/alphaelf.em: Likewise. * emultempl/arclinux.em: Likewise. * emultempl/armelf.em: Likewise. * emultempl/avrelf.em: Likewise. * emultempl/bfin.em: Likewise. * emultempl/cr16elf.em: Likewise. * emultempl/crxelf.em: Likewise. * emultempl/cskyelf.em: Likewise. * emultempl/elf-generic.em: Likewise. * emultempl/elf-x86.em: Likewise. * emultempl/epiphanyelf_4x4.em: Likewise. * emultempl/hppaelf.em: Likewise. * emultempl/ia64elf.em: Likewise. * emultempl/m68hc1xelf.em: Likewise. * emultempl/m68kelf.em: Likewise. * emultempl/metagelf.em: Likewise. * emultempl/mmix-elfnmmo.em: Likewise. * emultempl/mmixelf.em: Likewise. * emultempl/mmo.em: Likewise. * emultempl/needrelax.em: Likewise. * emultempl/nios2elf.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise. * emultempl/pruelf.em: Likewise. * emultempl/rxelf.em: Likewise. * emultempl/scoreelf.em: Likewise. * emultempl/spuelf.em: Likewise. * emultempl/tic6xdsbt.em: Likewise. * emultempl/v850elf.em: Likewise. * emultempl/vms.em: Likewise. * emultempl/vxworks.em: Likewise. * emultempl/xtensaelf.em: Likewise. * scripttempl/arclinux.sc: Likewise. * scripttempl/armbpabi.sc: Likewise. * scripttempl/elf.sc: Likewise. * scripttempl/elf64bpf.sc: Likewise. * scripttempl/elf64hppa.sc: Likewise. * scripttempl/elf_chaos.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise. * scripttempl/elfd10v.sc: Likewise. * scripttempl/elfm68hc11.sc: Likewise. * scripttempl/elfm68hc12.sc: Likewise. * scripttempl/elfm9s12z.sc: Likewise. * scripttempl/elfxgate.sc: Likewise. * scripttempl/elfxtensa.sc: Likewise. * scripttempl/epiphany_4x4.sc: Likewise. * scripttempl/iq2000.sc: Likewise. * scripttempl/mep.sc: Likewise. * scripttempl/nds32elf.sc: Likewise. * scripttempl/v850.sc: Likewise. * scripttempl/v850_rh850.sc: Likewise. * scripttempl/xstormy16.sc: Likewise. * testsuite/ld-arm/arm-dyn.ld: Likewise. * testsuite/ld-arm/arm-lib.ld: Likewise. * testsuite/ld-arm/arm-no-rel-plt.ld: Likewise. * testsuite/ld-arm/fdpic-main.ld: Likewise. * testsuite/ld-arm/fdpic-shared.ld: Likewise. * testsuite/ld-elf/elf.exp: Likewise. * testsuite/ld-elf/orphan-region.d: Likewise. * testsuite/ld-elf/orphan.d: Likewise. * testsuite/ld-elf/pr349.d: Likewise. * testsuite/ld-elf/warn2.d: Likewise. * testsuite/ld-elfvsb/elf-offset.ld: Likewise. * testsuite/ld-mips-elf/mips-dyn.ld: Likewise. * testsuite/ld-mips-elf/mips-lib.ld: Likewise. * testsuite/ld-scripts/dynamic-sections.t: Likewise. * testsuite/ld-shared/elf-offset.ld: Likewise. * configure: Regenerate.
* Regenerate with approved autotools versionAlan Modra2019-06-141-20/+8
| | | | | | | | | | | | | | | | | | | bfd/ * Makefile.in: Regenerate. * configure: Regenerate. binutils/ * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * doc/Makefile.in: Regenerate. gas/ * Makefile.in: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. ld/ * Makefile.in: Regenerate. * configure: Regenerate. libctf/ * configure: Regenerate.
* ld: add support for eBPFJose E. Marchesi2019-05-231-8/+20
| | | | | | | | | | | | | | | | | | | | | | This patch adds support to the linker for the Linux eBPF architecture. A minimal testsuite is included. ld/ChangeLog: 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com> * Makefile.am (ALL_64_EMULATION_SOURCES): Add eelf64bpf.c. * Makefile.in (prefix): Regenerate. * configure.tgt (targ_extra_ofiles): Add case for bpf-*-* targets. * emulparams/elf64bpf.sh: New file. * testsuite/lib/ld-lib.exp (check_gc_sections_available): Add bpf-*-* to the list of targets not supporting gc-sections. * testsuite/ld-bpf/bar.s: New file. * testsuite/ld-bpf/jump-1.d: Likewise. * testsuite/ld-bpf/foo.s: Likewise. * testsuite/ld-bpf/call-1.d: Likewise. * testsuite/ld-bpf/bpf.exp: Likewise. * testsuite/ld-bpf/baz.s: Likewise.
* Automatic makefile dependencies for generated ld/e*.cAlan Modra2019-04-131-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.