aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Gentoo: Pass --hash-style=sysv to ld in the testsuitegentoo/binutils-2.36-1gentoo/binutils-2.36Andreas K. Hüttel2021-01-242-3/+15
|
* Gentoo: ld: enable new dtags by default for linux/gnu targetsAndreas K. Hüttel2021-01-241-0/+10
| | | | | | | | | | | | | | | | | | Original author: Mike Frysinger <vapier@gentoo.org> The "new" dtags options have been around for 14+ years now, so for Linux and GNU targets, enable them by default. 2012-01-21 Mike Frysinger <vapier@gentoo.org> * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set link_info.new_dtags to TRUE for linux/gnu targets. * NEWS: Mention new dtags default. 2013-01-22 Roland McGrath <mcgrathr@google.com> * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set new_dtags to TRUE for *-*-nacl* targets.
* Gentoo: add --with-extra-soversion-suffix= optionSergei Trofimovich2021-01-244-0/+29
| | | | | | | | | | | | | | | | | | | | | --with-extra-soversion-suffix= will allow Gentoo to distinct libbfd.so and libopcodes.so to have more precise SONAME. Today --enable-targets=all and --enable-64-bit-bfd change libbfd.so ABI: --enable-targets=all adds new symbols to the library --enable-64-bit-bfd modifies BFD_ARCH_SIZE default and changes sizes of integer parameters and fields to most APIs. --with-extra-soversion-suffix= will allow Gentoo to inject additional keys into SONAME to indicate ABI change and avoid hard to diagnose crashes when user reinstalls libbfd.so built with different flags (see https://bugs.gentoo.org/663690). Bug: https://bugs.gentoo.org/666100 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Gentoo: opcodes: link against libbfd.la for rpath depsMike Frysinger2021-01-242-2/+2
| | | | | | | | | | | | | The reason opcodes doesn't link against libbfd.la is to workaround a libtool bug where it uses installed -L paths ahead of DESTDIR paths. The downside is that the library itself lacks rpath tags to find the right version of libbfd.so. Since Gentoo has patched the libtool bug for a while, we don't need the workaround. Use the .la file so we get the rpath tags. URL: https://bugs.gentoo.org/563934 (cherry picked from commit 662586237b0b00ee881e79b56f6234ff36e8bfe6)
* Gentoo: libiberty: install PIC version of libiberty.aMike Frysinger2021-01-241-0/+1
| | | | | | | | | | | | | This will install a PIC version of libiberty.a by overwriting the non-PIC version of libiberty.a while compiling. We do this because there is no shared version of libiberty for random apps to link against which means if someone wants to use this in a shared library or PIE, they're out of luck. It's arguable whether people should be able to use this in a shared lib, but usage in PIE should be fine. You could argue that this penalizes the non-PIE users, but the counter point is that people using this library in general are fairly low, and we'd rather have things work for all of them. (cherry picked from commit 112aff9ad3e2675556370c4281117a6df0a879d9)
* Gentoo: gold/ld: add support for poisoned system directoriesMike Frysinger2021-01-2411-0/+146
| | | | | | | | | | | | | | | | | | | | | | This is based on the old CodeSourcery patch written by Joseph Myers to add support to the link for detecting & rejecting bad -L paths when using a cross-compiler. The differences here: * The command line flags are always available. * We can turn on & off the warning via the command line. * The configure option controls the default warning behavior. * Add support for gold. It is not currently upstream, nor has it been submitted at all. There are no plans to do so currently either. BUG=chromium:488360 TEST=`cbuildbot chromiumos-sdk` passes # tests arm/amd64/mipsel/x86 TEST=`cbuildbot panther_moblab-full whirlwind-release` pass TEST=`cbuildbot {x32,arm64}-generic-full` has no new failures TEST=x86_64-cros-linux-gnu-ld throws warnings when using -L/lib (gold & bfd) Reviewed-on: https://chromium-review.googlesource.com/272083 (cherry picked from commit f92dbf35c00ab13cee36f6be8ae5ca46454d9000)
* gas: Add a testcase for PR gas/27228H.J. Lu2021-01-244-0/+21
| | | | | | | | | PR gas/27228 * testsuite/gas/elf/elf.exp: Run pr27228. * testsuite/gas/elf/pr27228.d: New file. * testsuite/gas/elf/pr27228.s: Likewise. (cherry picked from commit eea133e65524218c05bd7a1e93b4fe4241dd8e08)
* Enable development. Set version to 2.36.0Nick Clifton2021-01-2416-64/+92
|
* 2.36 releasebinutils-2_36Nick Clifton2021-01-2423-470/+520
|
* PR27228, .reloc wrong symbol emitted for undefined local symbolAlan Modra2021-01-242-1/+9
| | | | | | | | | | | | | | Local symbols are of course supposed to be defined by their object file, but in other cases a local symbol is promoted to global by gas if undefined and referenced. This patch stops gas wrongly replacing a local undefined symbol with the undefined section symbol, resulting in a .reloc undefined local symbol being emitted as global. PR 27228 * write.c (resolve_reloc_expr_symbols): Don't assume local symbol is defined. (cherry picked from commit 68fcee4fa753f6488c9f90610da2f5a5a95d5a1f)
* DWARF-5: Fix parsing DWARF-5 line number tablesH.J. Lu2021-01-232-0/+8
| | | | | | | | | | | | | | | | Advance rngs_ptr when parsing DW_RLE_offset_pair, which was missing in commit c3757b583d2448a5996e83e374fb96ac7938da35 Author: Mark Wielaard <mark@klomp.org> Date: Tue Aug 25 15:33:00 2020 +0100 Fix the linker's handling of DWARF-5 line number tables. PR binutils/27231 * dwarf2.c (read_rnglists): Advance rngs_ptr after _bfd_safe_read_leb128 when parsing DW_RLE_offset_pair. (cherry picked from commit 18454c151f5824564130ba626bd90e9de30444ef)
* Automatic date update in version.inGDB Administrator2021-01-241-1/+1
|
* Automatic date update in version.inGDB Administrator2021-01-231-1/+1
|
* Automatic date update in version.inGDB Administrator2021-01-221-1/+1
|
* PR27221, 058430b4a1 warnings while assembling the Linux kernelAlan Modra2021-01-216-22/+13
| | | | | | | | | | | | PR 27221 * dwarf2dbg.c (dwarf2_gen_line_info_1): Don't warn about ignored line number info when gas is generating it. * testsuite/gas/elf/dwarf2-20.d: Adjust to not expect warnings. * testsuite/gas/m68hc11/indexed12.d: Likewise. * testsuite/gas/elf/elf.exp: Don't run warn-2. * gas/testsuite/gas/elf/warn-2.s: Delete. (cherry picked from commit be07043ea8ea9b22a8db1ff46b557321a7714e9a)
* PR27218, memory access violation in dwarf2dbg.cAlan Modra2021-01-212-13/+20
| | | | | | | | | PR 27218 * dwarf2dbg.c (dwarf2_gen_line_info): Correct setting of dwarf_level. (dwarf2_directive_filename, dwarf2_directive_loc): Likewise, and error for negative file numbers. (cherry picked from commit 498ff0328fed7689f7a675d8c9f0f04bed1f1522)
* mips XPASS pr26936Alan Modra2021-01-212-5/+7
| | | | | | | | | git commit 994b25132814 "Ignore section symbols when matching linkonce with comdat" cured the reason why this test used to fail on mips. * testsuite/ld-elf/pr26936.d: No longer xfail mips. (cherry picked from commit c78eec4424a6322682b3a164d1691135dcf004b3)
* Automatic date update in version.inGDB Administrator2021-01-211-1/+1
|
* PowerPC64 synthetic symbolsAlan Modra2021-01-202-1/+7
| | | | | | | | | | | If an assembler trims off unused section symbols there may be no section symbols. This means that testing for the .opd section symbol needs to test both the section name and symbol flags. * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't assume section symbols are present. (cherry picked from commit 8bd10d6b16de92570336e6026d466ef90e077e6e)
* Automatic date update in version.inGDB Administrator2021-01-201-1/+1
|
* libctf, create: fix ctf_type_add of structs with unnamed membersNick Alcock2021-01-195-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our recent commit to support unnamed structure members better ditched the old ctf_member_iter iterator body in favour of ctf_member_next. However, these functions treat unnamed structure members differently: ctf_member_iter just returned whatever the internal representation contained, while ctf_member_next took care to always return "" rather than sometimes returning "" and sometimes NULL depending on whether the dict was dynamic (a product of ctf_create) or not (a product of ctf_open). After this commit, ctf_member_iter did the same. It was always a bug for external callers not to treat a "" return from these functions as if it were NULL, so only buggy callers could be affected -- but one of those buggy callers was ctf_add_type, which assumed that it could just take whatever name was returned from ctf_member_iter and slam it directly into the internal representation of a dynamic dict -- which expects NULL for unnamed members, not "". The net effect of all of this is that taking a struct containing unnamed members and ctf_add_type'ing it into a dynamic dict produced a dict whose unnamed members were inaccessible to ctf_member_info (though if you wrote that dict out and then ctf_open'ed it, they would magically reappear again). Compensate for this by suitably transforming a "" name into NULL in the internal representation, as should have been done all along. libctf/ChangeLog 2021-01-19 Nick Alcock <nick.alcock@oracle.com> * ctf-create.c (membadd): Transform ""-named members into NULL-named ones. * testsuite/libctf-regression/type-add-unnamed-struct*: New test. (cherry picked from commit 26503e2f5eae6019c8649a3dd204a82705efc740)
* libctf: lookup_by_name: do not return success for nonexistent pointer typesNick Alcock2021-01-195-10/+45
| | | | | | | | | | | | | | | | | | | The recent work allowing lookups of pointers in child dicts when the pointed-to type is in the parent dict broke the case where a pointer type that does not exist at all is looked up: we mistakenly return the pointed-to type, which is likely not a pointer at all. This causes considerable confusion. Fixed, with a new testcase. libctf/ChangeLog 2021-01-19 Nick Alcock <nick.alcock@oracle.com> * ctf-lookup.c (ctf_lookup_by_name_internal): Do not return the base type if looking up a nonexistent pointer type. * testsuite/libctf-regression/pptrtab*: Test it. (cherry picked from commit e05a3e5a491a8ef2079eef558bbe8e9feb0b3c03)
* [GOLD] powerpc assertion failureAlan Modra2021-01-192-1/+6
| | | | | | | | | | | | A testcase with only ifuncs can result in no plt section (ifunc plt entries might instead be in iplt), which means we can get to this code without a static link. PR 27203 * powerpc.cc (do_plt_fde_location): Remove doing_static_link assertion. (cherry picked from commit a75a6a416477915b7d236537c9170ced3064df11)
* ld: Just xfail riscv little endian targets for compressed1d.d test.Nelson Chu2021-01-193-2/+23
| | | | | | | | | | | | | | | | | The sizes of compressed and uncompressed .debug_aranges are the same for the riscv big endian targets, but different for the little endian targets. The compress rule is fine and isn't broken by riscv, just the original compressed1d.d fails by accident. Ideally, we should fill the R_RISCV_ADD/SUB relocations when disabling relaxations in the assembler. But before that, Jim already had written an alternative test compressed1d-alt to relpace compressed1d.d for riscv, so we can only xfail the riscv little endian targets in the short-term. ld/ * testsuite/ld-elf/elf.exp (riscv_little_endian): Added. Return true if target is riscv little endian. Otherwise, return false. * testsuite/ld-elf/compressed1d.d: Only xfail the riscv little endian targets by [riscv_little_endian].
* Automatic date update in version.inGDB Administrator2021-01-191-1/+1
|
* as: Automatically enable DWARF5 supportH.J. Lu2021-01-184-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | Currently $ as -o x.o x.s fails when x.s contains DWARF5 ".file 0" or ".loc 0" directives. Update assembler to automatically enable DWARF5 support so that $ gcc -S -g -c x.c $ gcc -c x.s works. PR gas/27195 * dwarf2dbg.c (dwarf2_gen_line_info): Set dwarf_level to 5 if needed. (dwarf2_directive_filename): Likewise. (dwarf2_directive_loc): Likewise. * testsuite/gas/elf/dwarf-5-file0.d: Pass --gdwarf-3. * testsuite/gas/lns/lns-diag-1.l: Remove the "Error: file number less than one" errors. (cherry picked from commit 705989f19adf20dd70c50237ec61cd708f2b0939)
* gold: Remove the circular IFUNC dependency in ifuncmain6pieH.J. Lu2021-01-183-16/+14
| | | | | | | | | | | | | | | | On Fedora 33 x86-64 with glibc 2.32-3, ifuncmain6pie failed with: ./ifuncmain6pie: IFUNC symbol 'foo' referenced in './ifuncmod6.so' is defined in the executable and creates an unsatisfiable circular dependency. FAIL ifuncmain6pie (exit status: 127) Remove non-JUMP_SLOT relocations against foo in ifuncmod6.so, which trigger the circular IFUNC dependency. * testsuite/ifuncmain6pie.c: Remove non-JUMP_SLOT relocations against foo in ifuncmod6.so. * testsuite/ifuncmod6.c: Likewise. (cherry picked from commit 25294ff049728a081c703b68f848d2cc04eef483)
* ld/elf: Ignore section symbols when matching linkonce with comdatH.J. Lu2021-01-187-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When deciding if a single member comdat group section in file FOO should be discarded by a linkonce section in file BAR, we check if 2 sections define the same set of local and global symbols. When only one of the files doesn't contain the unused section symbols in the symbol table, such as object files generated by clang or GNU assembler with commit d1bcae833b32f1408485ce69f844dcd7ded093a8 Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu Jan 7 06:42:00 2021 -0800 ELF: Don't generate unused section symbols the check will fail since one file has the extra unused section symbols. We should ignore both undefined and section symbols in the symbol table when making such a decision. bfd/ PR ld/27193 * elflink.c (elf_create_symbuf): Also ignore section symbols. ld/ PR ld/27193 * testsuite/ld-i386/i386.exp: Run PR ld/27193 test. * testsuite/ld-i386/pr27193.dd: New file. * testsuite/ld-i386/pr27193a.o.bz2: Likewise. * testsuite/ld-i386/pr27193b.s: Likewise. (cherry picked from commit 994b25132814f4c2be93ce53a616a74139c4cf3c)
* ld/elf/x86: Don't compare IFUNC address in the shared objectH.J. Lu2021-01-185-23/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On x86, glibc 2.33 starts to issue a fatal error message when calling IFUNC function defined in the unrelocated executable from a shared library. 1. Update x86 ELF linker to always convert IFUNC function defined in position-dependent executable (PDE) to the normal function. GOT in PDE will be updated by R_*_IRELATIVE at run-time. 2. Update PR ld/23169 tests not to compare function address of external IFUNC function in the shared object to avoid calling the IFUNC function defined in the unrelocated executable. 3. Remove pr23169e tests which call the IFUNC function defined in the unrelocated position-independent executable from a shared library. bfd/ PR ld/23169 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): Don't check pointer_equality_needed. ld/ PR ld/23169 * testsuite/ld-ifunc/ifunc.exp: Replace pr23169c.rd with pr23169a.rd for pr23169c and pr23169f. Remove pr23169e tests. * testsuite/ld-ifunc/pr23169a.c (foo): Don't compare function address. (cherry picked from commit 75a933f39918ce4f4b9481234992895e022787ee)
* Automatic date update in version.inGDB Administrator2021-01-181-1/+1
|
* Automatic date update in version.inGDB Administrator2021-01-171-1/+1
|
* Automatic date update in version.inGDB Administrator2021-01-161-1/+1
|
* Automatic date update in version.inGDB Administrator2021-01-151-1/+1
|
* bfin: Skip non SEC_ALLOC section for R_BFIN_FUNCDESCH.J. Lu2021-01-142-117/+124
| | | | | | | | | | | | Linker should never generate dynamic relocations for relocations in non-SEC_ALLOC section which has no impact on run-time behavior. Such relocations should be resolved to 0. PR ld/26688 * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC section for R_BFIN_FUNCDESC. (cherry picked from commit 8ca9c7eb6773dd3cc9c536787b3489d36356ccf7)
* Updated translations for some subdirectoriesNick Clifton2021-01-146-3842/+4403
|
* Fix an illegal memory access parsing a win32pstatus note with a type of 0.Nick Clifton2021-01-142-2/+7
| | | | * elf.c (elfcore_grok_win32pstatus): Check for a note type of 0.
* Automatic date update in version.inGDB Administrator2021-01-141-1/+1
|
* Automatic date update in version.inGDB Administrator2021-01-131-1/+1
|
* elf/x86-64: Adjust R_AMD64_DIR64/R_AMD64_DIR32 for PE/x86-64 inputsH.J. Lu2021-01-127-0/+84
| | | | | | | | | | | | | | | | | | | | | | Subtract the value of the section contents for R_AMD64_DIR64 and R_AMD64_DIR32 relocations when generating ELF output from PE/x86-64 inputs. bfd/ PR ld/27171 * reloc.c (bfd_perform_relocation): Adjust R_AMD64_DIR64 and R_AMD64_DIR32 relocations for PE/x86-64 inputs. ld/ PR ld/27171 * testsuite/ld-x86-64/pe-x86-64-5.obj.bz2: New file. * testsuite/ld-x86-64/pe-x86-64-5.od: Likewise. * testsuite/ld-x86-64/pe-x86-64-5.rd: Likewise. * testsuite/ld-x86-64/pe-x86-64.exp: Run PR ld/27171 test. (cherry picked from commit c2e9a4a3ed1efcbdec68372e7e889470870d6d48)
* Updated translations for some subdirectoriesNick Clifton2021-01-126-5616/+5976
|
* Automatic date update in version.inGDB Administrator2021-01-121-1/+1
|
* aarch64: Remove support for CSREKyrylo Tkachov2021-01-1120-1535/+1457
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes support for the CSRE extension from aarch64 gas/objdump. CSRE (FEAT_CSRE) is part of the Future Architecture Technologies program and at this time Arm is withdrawing this particular feature. The patch removes the system registers and the CSR PDEC instruction. gas/ChangeLog * NEWS: Remove CSRE. * config/tc-aarch64.c (parse_csr_operand): Delete. (parse_operands): Delete handling of AARCH64_OPND_CSRE_CSR. (aarch64_features): Remove csre. * doc/c-aarch64.texi: Remove CSRE. * testsuite/gas/aarch64/csre.d: Delete. * testsuite/gas/aarch64/csre-invalid.s: Likewise. * testsuite/gas/aarch64/csre-invalid.d: Likewise. * testsuite/gas/aarch64/csre_csr.s: Likewise. * testsuite/gas/aarch64/csre_csr.d: Likewise. * testsuite/gas/aarch64/csre_csr-invalid.s: Likewise. * testsuite/gas/aarch64/csre_csr-invalid.l: Likewise. * testsuite/gas/aarch64/csre_csr-invalid.d: Likewise. include/ChangeLog * opcode/aarch64.h (AARCH64_FEATURE_CSRE): Delete. (aarch64_opnd): Delete AARCH64_OPND_CSRE_CSR. opcodes/ChangeLog * aarch64-asm-2.c: Regenerate. * aarch64-dis-2.c: Likewise. * aarch64-opc-2.c: Likewise. * aarch64-opc.c (aarch64_print_operand): Delete handling of AARCH64_OPND_CSRE_CSR. * aarch64-tbl.h (aarch64_feature_csre): Delete. (CSRE): Likewise. (_CSRE_INSN): Likewise. (aarch64_opcode_table): Delete csr.
* Add support for more MIPS variants to the linker command line.Matt Jenkins2021-01-112-0/+10
| | | | | | PR ld/27167 * ldmain.c (get_emulation): Add mipsmips32r3, mips32r5, mips64r3 and mips64r5 to list of known mips targets.
* Updated translations for multiple subdirectoriesNick Clifton2021-01-1123-19527/+21623
|
* Automatic date update in version.inGDB Administrator2021-01-111-1/+1
|
* ld/x86-64: Properly Handle -z lam-u48/lam-u57H.J. Lu2021-01-096-2/+55
| | | | | | | | | | | | | | | | | | | Properly merge GNU properties for LAM_U48 and LAM_U57. bfd/ PR ld/27166 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Handle -z lam-u48 and -z lam-u57. ld/ PR ld/27166 * testsuite/ld-x86-64/lam-u48.rd: New file. * testsuite/ld-x86-64/lam-u57.rd: Likewise. * testsuite/ld-x86-64/x86-64.exp: Add PR ld/27166 tests. (cherry picked from commit 0a94990bf64a82bdf73960fec1b47fef7c6a6ced)
* Change version number to 2.35.90 and regenerate configure and pot filesNick Clifton2021-01-0921-5763/+6164
|
* Add Changelog entries and NEWS entries for 2.36 branchNick Clifton2021-01-0918-1/+61
|
* sim: common: add missing stdlib.h for abort()Mike Frysinger2021-01-095-0/+9
|
* ld/x86-64: Also set LAM_U57 when setting LAM_U48H.J. Lu2021-01-085-4/+16
| | | | | | | | | | | | | | Since LAM_U48 implies LAM_U57, also set LAM_U57 when setting LAM_U48. bfd/ * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Also set LAM_U57 when setting LAM_U48. ld/ * ld-x86-64/property-x86-lam-u48-4.d: Updated. * ld-x86-64/property-x86-lam-u48-5.d: Likewise.