]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 8 Apr 2021 00:00:46 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 7 Apr 2021 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 6 Apr 2021 00:00:39 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 5 Apr 2021 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 4 Apr 2021 00:00:37 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 3 Apr 2021 00:00:36 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 2 Apr 2021 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoPE/Windows x86_64: Fix weak undef symbols after image base change
Tamar Christina [Thu, 1 Apr 2021 16:10:38 +0000 (17:10 +0100)] 
PE/Windows x86_64: Fix weak undef symbols after image base change

The change in PR19011 changed the image load address from being in the lower
32-bit address space to the higher 64-bit address space.

However when you have a weak undef symbol which stays undef at the end of
linking the linker has to resolve this (Windows loader does not support undef
symbols).  As such typically these would resolve to 0.

The relocation used for these weak symbols are the normal 32-bit PC_REL call
relocs.  So when doing the overflow check LD checks if the distance between the
symbol and the call is within range.  However now that the load address is
> 32-bits and the symbol val is 0 this overflow check will always fail.

As such the linker gives a bogus error.  This patch makes the linker not emit
the overflow failure but chooses to still let the check be performed (as it's
mid-end code).

One down side of this is that it does break the common convention that the call
be to sym at 0x0. i.e. before you'd get

      401015:   74 05                   je     40101c
      401017:   e8 e4 ef bf ff          callq  0

and now you get

   140001015:   74 05                   je     14000101c
   140001017:   e8 e4 ef ff bf          call   100000000

since the call is PC_REL there's no way to get the range large enough to
resolve to 0.  As such I have chosen to leave it as the furthest simple range
that we can still represent.

By only ignoring the error we leave the symbol value itself to still be 0
such that the if(<symbol>) checks still work correctly.

bfd/ChangeLog:

2021-04-01  Tamar Christina  <tamar.christina@arm.com>

PR ld/26659
* cofflink.c (_bfd_coff_generic_relocate_section): Ignore overflow.

ld/ChangeLog:

2021-04-01  Tamar Christina  <tamar.christina@arm.com>

PR ld/26659
* testsuite/ld-pe/pe.exp: Add test.
* testsuite/ld-pe/pr26659-weak-undef-sym.d: New test.
* testsuite/ld-pe/pr26659-weak-undef-sym.s: New test.

(cherry picked from commit 74edb473c9ecf5e2053ecf8e429ee608feafb9e1)

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 1 Apr 2021 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 31 Mar 2021 00:00:38 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 30 Mar 2021 00:00:38 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 29 Mar 2021 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 28 Mar 2021 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 27 Mar 2021 00:00:37 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 26 Mar 2021 00:00:37 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 25 Mar 2021 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 24 Mar 2021 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 23 Mar 2021 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoDWARF: Check version >= 3 for DW_FORM_ref_addr
H.J. Lu [Fri, 19 Mar 2021 01:34:38 +0000 (18:34 -0700)] 
DWARF: Check version >= 3 for DW_FORM_ref_addr

Check version >= 3, instead of version == 3 || version == 4, for
DW_FORM_ref_addr.

bfd/

PR ld/27587
* dwarf2.c (read_attribute_value): Check version >= 3 for
DW_FORM_ref_addr.

ld/

PR ld/27587
* testsuite/ld-x86-64/pr27587.err: New file.
* testsuite/ld-x86-64/pr27587a.obj.bz2: Likewise.
* testsuite/ld-x86-64/pr27587b.obj.bz2: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run PR ld/27587 test.

(cherry picked from commit 51f6e7a9f4210aed0f8156c1d2e348de6f96f37d)

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 22 Mar 2021 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 21 Mar 2021 00:00:35 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 20 Mar 2021 00:00:29 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAdd install dependencies for ld -> bfd and libctf -> bfd
Nick Alcock [Thu, 18 Mar 2021 12:37:52 +0000 (12:37 +0000)] 
Add install dependencies for ld -> bfd and libctf -> bfd

This stops problems parallel-installing if a relink of libctf is needed.

Also adds corresponding install-strip dependencies.

ChangeLog
2021-03-18  Nick Alcock  <nick.alcock@oracle.com>

PR libctf/27482
* Makefile.def: Add install-bfd dependencies for install-libctf and
install-ld, and install-strip-bfd dependencies for
install-strip-libctf and install-strip-ld; move the install-ld
dependency on install-libctf to join it.
* Makefile.in: Regenerated.

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 19 Mar 2021 00:00:28 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 18 Mar 2021 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 17 Mar 2021 00:00:31 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 16 Mar 2021 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 15 Mar 2021 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 14 Mar 2021 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 13 Mar 2021 00:00:38 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 12 Mar 2021 00:00:48 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 11 Mar 2021 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 10 Mar 2021 00:01:15 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 9 Mar 2021 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 8 Mar 2021 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 7 Mar 2021 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 6 Mar 2021 00:00:38 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 5 Mar 2021 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 4 Mar 2021 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 3 Mar 2021 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoPowerPC64 undefined weak visibility vs GOT optimisation
Alan Modra [Tue, 2 Mar 2021 10:52:31 +0000 (21:22 +1030)] 
PowerPC64 undefined weak visibility vs GOT optimisation

Undefined weak symbols with non-default visibility are seen as local
by SYMBOL_REFERENCES_LOCAL.  This stops a got indirect to relative
optimisation for them, so that pies and dlls don't get non-zero values
when loading somewhere other than the address they are linked at
(which always happens).  The optimisation could be allowed for pdes,
but I thought it best not to allow it there too.

bfd/
* elf64-ppc.c (ppc64_elf_relocate_section): Don't optimise got
indirect to pc-relative or toc-relative for undefined symbols.
ld/
* testsuite/ld-powerpc/weak1.d,
* testsuite/ld-powerpc/weak1.r,
* testsuite/ld-powerpc/weak1.s,
* testsuite/ld-powerpc/weak1so.d,
* testsuite/ld-powerpc/weak1so.r: New tests.
* testsuite/ld-powerpc/powerpc.exp: Run them.

(cherry picked from commit f5b9c288a3057f0f04e74f00fdb0e79d171d54a8)

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 2 Mar 2021 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoPR27441, inconsistency in weak definitions
Alan Modra [Wed, 24 Feb 2021 07:31:16 +0000 (18:01 +1030)] 
PR27441, inconsistency in weak definitions

This makes IR objects use the same logic as normal objects with
respect to what sort of ref/def makes an as-needed library needed.
Testing the binding of the definition is just plain wrong.  What
matters is the binding of the reference.

PR 27441
* elf-bfd.h (struct elf_link_hash_entry): Add ref_ir_nonweak.
* elflink.c (elf_link_add_object_symbols): Set ref_ir_nonweak and
use when deciding an as-needed library should be loaded instead
of using the binding of the library definition.

(cherry picked from commit bbaddd4bbeba65200ee805d87c2e3a845842e3eb)

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 1 Mar 2021 00:01:04 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 28 Feb 2021 00:00:36 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 27 Feb 2021 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoRe: Use make_tempname file descriptor in smart_rename
Alan Modra [Wed, 24 Feb 2021 23:16:02 +0000 (09:46 +1030)] 
Re: Use make_tempname file descriptor in smart_rename

PR 27456
* rename.c (simple_copy): Mark target_stat ATTRIBUTE_UNUSED.

(cherry picked from commit 40b02646ec5b197e63ba904f95ea101d95a50cf4)

4 years agoUse make_tempname file descriptor in smart_rename
Alan Modra [Tue, 23 Feb 2021 01:40:58 +0000 (12:10 +1030)] 
Use make_tempname file descriptor in smart_rename

This patch makes use of the temp file descriptor in smart_rename
rather than reopening the file.  I don't believe there is a security
issue in reopening the file, but this way is one less directory
operation.  The patch also attempts to preserve S_ISUID and S_ISGID.

PR 27456
* bucomm.h (smart_rename): Update prototype.
* rename.c (smart_rename): Add fromfd and preserve_dates params.
Pass fromfd and target_stat to simple_copy.  Call set_times
when preserve_dates.
(simple_copy): Accept fromfd rather than from filename.  Add
target_stat param.  Rewind fromfd rather than opening.  Open
"to" file without O_CREAT.  Try to preserve S_ISUID and S_ISGID.
* ar.c (write_archive): Rename ofd to tmpfd.  Dup tmpfd before
closing output temp file, and pass tmpfd to smart_rename.
* arsup.c (temp_fd): Rename from real_fd.
(ar_save): Dup temp_fd and pass to smart_rename.
* objcopy.c (strip_main, copy_main): Likewise, and pass
preserve_dates.

(cherry picked from commit c42c71a1527dd70417d3966dce7ba9edbcf4bdb4)

4 years agoPR27456, lstat in rename.c on MinGW
Alan Modra [Mon, 22 Feb 2021 23:07:39 +0000 (09:37 +1030)] 
PR27456, lstat in rename.c on MinGW

PR 27456
* rename.c: Tidy throughout.
(smart_rename): Always copy.  Remove windows specific code.

(cherry picked from commit cca8873dd5a6015d5557ea44bc1ea9c252435a29)

4 years agoReinstate various pieces backed out from smart_rename changes
Alan Modra [Fri, 26 Feb 2021 01:00:32 +0000 (11:30 +1030)] 
Reinstate various pieces backed out from smart_rename changes

In the interests of a stable release various last minute smart_rename
patches were backed out of the 2.36 branch.  The main reason to
reinstate some of those backed out changes here is to make necessary
followup fixes to commit 8e03235147a9 simple cherry-picks from
mainline.  A secondary reason is that ar -M support isn't fixed for
pr26945 without this patch.

PR 26945
* ar.c: Don't include libbfd.h.
(write_archive): Replace xmalloc+strcpy with xstrdup.
* arsup.c (temp_name, real_ofd): New static variables.
(ar_open): Use make_tempname and bfd_fdopenw.
(ar_save): Adjust to suit ar_open changes.
* objcopy.c: Don't include libbfd.h.
* rename.c: Rename and reorder variables.

(cherry picked from commit 95b91a043aeaeb546d2fea556d84a2de1e917770)

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 26 Feb 2021 00:00:42 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 25 Feb 2021 00:00:46 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 24 Feb 2021 00:00:46 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 23 Feb 2021 00:00:38 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agobinutils: Avoid renaming over existing files
Siddhesh Poyarekar [Mon, 22 Feb 2021 15:15:50 +0000 (20:45 +0530)] 
binutils: Avoid renaming over existing files

Renaming over existing files needs additional care to restore
permissions and ownership, which may not always succeed.
Additionally, other properties of the file such as extended attributes
may be lost, making the operation flaky.

For predictable results, resort to rename() only if the file does not
exist, otherwise copy the file contents into the existing file.  This
ensures that no additional tricks are needed to retain file
properties.

This also allows dropping of the redundant set_times on the tmpfile in
objcopy/strip since now we no longer rename over existing files.

binutils/

* ar.c (write_archive): Adjust call to SMART_RENAME.
* arsup.c (ar_save): Likewise.
* objcopy (strip_main): Don't set times on temporary file and
adjust call to SMART_RENAME.
(copy_main): Likewise.
* rename.c [!S_ISLNK]: Remove definitions.
(try_preserve_permissions): Remove function.
(smart_rename): Replace PRESERVE_DATES argument with
TARGET_STAT.  Use rename system call only if TO does not exist.
* bucomm.h (smart_rename): Adjust declaration.

(cherry picked from commit 3685de750e6a091663a0abe42528cad29e960e35)

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 22 Feb 2021 00:00:39 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 21 Feb 2021 00:00:37 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 20 Feb 2021 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoIBM Z: Implement instruction set extensions
Andreas Krebbel [Mon, 15 Feb 2021 13:20:00 +0000 (14:20 +0100)] 
IBM Z: Implement instruction set extensions

opcodes/

        * s390-mkopc.c (main): Accept arch14 as cpu string.
        * s390-opc.txt: Add new arch14 instructions.

include/

        * opcode/s390.h (enum s390_opcode_cpu_val): Add
        S390_OPCODE_ARCH14.

gas/

        * config/tc-s390.c (s390_parse_cpu): New entry for arch14.
        * doc/c-s390.texi: Document arch14 march option.
        * testsuite/gas/s390/s390.exp: Run the arch14 related tests.
        * testsuite/gas/s390/zarch-arch14.d: New test.
        * testsuite/gas/s390/zarch-arch14.s: New test.

(cherry picked from commit ba2b480f1037082d27da1afdfe0793c8aac9b1bd)

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 19 Feb 2021 00:00:42 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 18 Feb 2021 00:01:11 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 17 Feb 2021 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 16 Feb 2021 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 15 Feb 2021 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 14 Feb 2021 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 13 Feb 2021 00:00:34 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 12 Feb 2021 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 11 Feb 2021 00:00:38 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 10 Feb 2021 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoPR27382, build failure if fileno() is a macro
Alan Modra [Tue, 9 Feb 2021 03:02:36 +0000 (13:32 +1030)] 
PR27382, build failure if fileno() is a macro

PR 27382
* objcopy.c (copy_file): Use bfd_stat.

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 9 Feb 2021 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 8 Feb 2021 00:00:46 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agold: Remove x86 ISA level run-time tests
H.J. Lu [Sun, 7 Feb 2021 21:11:16 +0000 (13:11 -0800)] 
ld: Remove x86 ISA level run-time tests

Remove x86 ISA level run-time tests since with glibc 2.33, they will fail
to run on machines with lesser x86 ISA level:

tmpdir/property-5-pie: CPU ISA level is lower than required

PR ld/27358
* testsuite/ld-i386/i386.exp: Remove property 3/4/5 run-time
tests.
* testsuite/ld-x86-64/x86-64.exp: Likewise.

(cherry picked from commit 38a143aa8c633225e000fd006a5a171f0b6c80ee)

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 7 Feb 2021 00:00:32 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoReset development back to true
Nick Clifton [Sat, 6 Feb 2021 09:21:36 +0000 (09:21 +0000)] 
Reset development back to true

4 years agoThis is 2.36.1 release binutils-2_36_1
Nick Clifton [Sat, 6 Feb 2021 09:12:37 +0000 (09:12 +0000)] 
This is 2.36.1 release

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 6 Feb 2021 00:00:35 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoRevert "binutils: Make smart_rename safe too"
Nick Clifton [Fri, 5 Feb 2021 14:14:01 +0000 (14:14 +0000)] 
Revert "binutils: Make smart_rename safe too"

This reverts commit 014cc7f849e8209623fc99264814bce7b3b6faf2.
Given the problems associated with this patch and the others intended to fix the smart_rename CVE, the decision has been taken to$

4 years agoRevert "Fix a build problem when using FreeBSD 12."
Nick Clifton [Fri, 5 Feb 2021 14:12:24 +0000 (14:12 +0000)] 
Revert "Fix a build problem when using FreeBSD 12."

This reverts commit b143e2d506bee1020752597f979d5af174edc36d.
Given the problems associated with this patch and the others intended to fix the smart_rename CVE, the decision has been taken to$

4 years agoRevert "pr27270 and pr27284, ar segfaults and wrong file mode"
Nick Clifton [Fri, 5 Feb 2021 14:10:21 +0000 (14:10 +0000)] 
Revert "pr27270 and pr27284, ar segfaults and wrong file mode"

This reverts commit 95b91a043aeaeb546d2fea556d84a2de1e917770.
Given the problems associated with this patch and the others intended to fix the smart_rename CVE, the decision has been taken to$

4 years agoRevert "PR27345, binutils/arsup.c: lstat() not available on all targets"
Nick Clifton [Fri, 5 Feb 2021 14:08:16 +0000 (14:08 +0000)] 
Revert "PR27345, binutils/arsup.c: lstat() not available on all targets"

This reverts commit c0034ac596db89dfb5fa007a63488ad7af555fe9.
Given the problems associated with this patch and the others intended to fix the smart_rename CVE, the decision has been taken to revert the patches for the 2.36.1 point release.

4 years agoPR27345, binutils/arsup.c: lstat() not available on all targets
Alan Modra [Fri, 5 Feb 2021 02:29:16 +0000 (12:59 +1030)] 
PR27345, binutils/arsup.c: lstat() not available on all targets

We can just use stat here, the same as is done in ar.c:open_inarch.

PR 27345
* arsup.c (ar_save): Use stat rather than lstat.

(cherry picked from commit c180f095f32ca62f138da9bc7fb96cac0365fb5d)

4 years agoRISC-V: Removed the v0.93 bitmanip ZBA/ZBB/ZBC instructions.
Nelson Chu [Thu, 4 Feb 2021 08:15:03 +0000 (16:15 +0800)] 
RISC-V: Removed the v0.93 bitmanip ZBA/ZBB/ZBC instructions.

bfd/
    * elfxx-riscv.c (riscv_parse_prefixed_ext): Removed zb*.
gas/
    * config/tc-riscv.c (riscv_multi_subset_supports): Removed
    INSN_CLASS_ZB*.
    * testsuite/gas/riscv/bitmanip-insns-32.d: Removed.
    * testsuite/gas/riscv/bitmanip-insns-64.d: Removed.
    * testsuite/gas/riscv/bitmanip-insns.s: Removed.
include/
    * opcode/riscv-opc.h: Removed macros for zb* extensions.
    * opcode/riscv.h (riscv_insn_class): Removed INSN_CLASS_ZB*.
opcodes/
    * riscv-opc.c (MASK_RVB_IMM): Removed.
    (riscv_opcodes): Removed zb* instructions.
    (riscv_ext_version_table): Removed versions for zb*.

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 5 Feb 2021 00:00:38 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agold: Restore PR ld/15146 tests
H.J. Lu [Thu, 4 Feb 2021 13:11:37 +0000 (05:11 -0800)] 
ld: Restore PR ld/15146 tests

commit 7d409ac001cce916661d345bff01ed589991e762
Author: Alan Modra <amodra@gmail.com>
Date:   Thu Feb 4 13:56:34 2021 +1030

    PR27311, (symbol from plugin): undefined reference, hidden sym

fixed PR ld/15146.  Restore PR ld/15146 tests.

PR ld/15146
* testsuite/ld-plugin/lto.exp: Run PR ld/15146 tests.
* testsuite/ld-plugin/pr15146.d: Restored.
* testsuite/ld-plugin/pr15146a.c: Likewise.
* testsuite/ld-plugin/pr15146b.c: Likewise.
* testsuite/ld-plugin/pr15146c.c: Likewise.
* testsuite/ld-plugin/pr15146d.c: Likewise.

(cherry picked from commit 37707bd8221c2e3f7676de8bee0c42ce3ab38c77)

4 years agoPR27311, (symbol from plugin): undefined reference, hidden sym
Alan Modra [Thu, 4 Feb 2021 03:26:34 +0000 (13:56 +1030)] 
PR27311, (symbol from plugin): undefined reference, hidden sym

bfd/
PR 27311
* elflink.c (elf_link_add_object_symbols): Don't pull in as-needed
libraries for IR references on pass over libraries after LTO
recompilation.
ld/
* testsuite/ld-plugin/pr27311d.c: New test.
* testsuite/ld-plugin/lto.exp: Rename pr27311 to pr27311-1, compile
and link new test as pr27311-2.

(cherry picked from commit 7d409ac001cce916661d345bff01ed589991e762)

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 4 Feb 2021 00:00:35 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agopr27270 and pr27284, ar segfaults and wrong file mode
Alan Modra [Sun, 31 Jan 2021 15:34:41 +0000 (02:04 +1030)] 
pr27270 and pr27284, ar segfaults and wrong file mode

PR 27270
PR 27284
PR 26945
* ar.c: Don't include libbfd.h.
(write_archive): Replace xmalloc+strcpy with xstrdup.  Use
bfd_stat rather than fstat on iostream.  Move stat and fd tests
outside of _WIN32 ifdef.  Delete skip_stat variable.
* arsup.c (temp_name, real_ofd): New static variables.
(ar_open): Use make_tempname and bfd_fdopenw.
(ar_save): Adjust to suit ar_open changes.  Move stat output
of _WIN32 ifdef.
* objcopy.c: Don't include libbfd.h.
(copy_file): Use bfd_stat.

(cherry picked from commit 95b91a043aeaeb546d2fea556d84a2de1e917770)

4 years agoPR27311, ld.bfd (symbol from plugin): undefined reference
Alan Modra [Tue, 2 Feb 2021 04:35:14 +0000 (15:05 +1030)] 
PR27311, ld.bfd (symbol from plugin): undefined reference

A default versioned symbol definition in a shared library is
overridden by an unversioned definition in a regular object file, and
thus should not be reason to make an as-needed library needed.

bfd/
PR 27311
* elflink.c (elf_link_add_object_symbols): Don't pull in as-needed
libraries when H is an indirect symbol after calling
_bfd_elf_add_default_symbol.
ld/
* testsuite/ld-ifunc/ifunc.exp (libpr16467b.so, libpr16467bn.so):
Link with --as-needed.

* testsuite/ld-plugin/pr27311.d,
* testsuite/ld-plugin/pr27311.ver,
* testsuite/ld-plugin/pr27311a.c,
* testsuite/ld-plugin/pr27311b.c,
* testsuite/ld-plugin/pr27311c.c: New testcase.
* testsuite/ld-plugin/lto.exp: Run it.  Correct PR14918 and
PR12982 entries.

(cherry picked from commit 9918bff7cf2a566aaa2036d2242a61c140652dc7)
(cherry picked from commit 6955136728a68365bbb5e6e1327dff1654b2a0ca)
(cherry picked from commit f01fb44c0621b064996493bb5acd5077646ea84e)

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 3 Feb 2021 00:00:28 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 2 Feb 2021 00:00:36 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 1 Feb 2021 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 31 Jan 2021 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 30 Jan 2021 00:00:30 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoPR27259, SHF_LINK_ORDER self-link
Alan Modra [Thu, 28 Jan 2021 00:00:36 +0000 (10:30 +1030)] 
PR27259, SHF_LINK_ORDER self-link

This stops ld from endless looping on SHF_LINK_ORDER sh_link loops.

bfd/
PR 27259
* elflink.c (_bfd_elf_gc_mark_extra_sections): Use linker_mark to
prevent endless looping of linked-to sections.
ld/
PR 27259
* ldelf.c (ldelf_before_place_orphans): Use linker_mark to
prevent endless looping of linked-to sections.

(cherry picked from commit def97fb945a98544938087eff3111e16ce58da6d)

4 years agoPR27271, c6x-uclinux-ld segfaults linking ld-uClibc-1.0.37.so
Alan Modra [Fri, 29 Jan 2021 00:27:48 +0000 (10:57 +1030)] 
PR27271, c6x-uclinux-ld segfaults linking ld-uClibc-1.0.37.so

bfd/
PR 27271
* elflink.c (bfd_elf_link_record_dynamic_symbol): Don't segfault
on symbols defined in absolute or other special sections.
ld/
* testsuite/ld-tic6x/tic6x.exp: Add pr27271 test.

(cherry picked from commit c4566785ac265b3e4b3cde0e43733975c58d9175)

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 29 Jan 2021 00:00:30 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agogold: Skip address size and segment selector for DWARF5
H.J. Lu [Thu, 28 Jan 2021 12:21:15 +0000 (04:21 -0800)] 
gold: Skip address size and segment selector for DWARF5

The .debug_line secton in DWARF5 has a byte for address size and a byte
for segment selector after DWARF version.  Skip them for DWARF5.

PR gold/27246
* dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog):
Skip address size and segment selector for DWARF5.

(cherry picked from commit 0318cca4934fc5d85e83351842985ad2a3475146)

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 28 Jan 2021 00:00:36 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agold: depend on libctf
Nick Alcock [Tue, 26 Jan 2021 16:05:17 +0000 (16:05 +0000)] 
ld: depend on libctf

Since ld may depend on libctf (if present), and libctf may be relinked
by the installation process, libctf must be installed before ld is,
or the relink may fail if it calls on symbols or symbol versions that do
not exist in any libctf already present on the system.  (If none is
present, the copy in the build tree will be automatically used, but
if one *is* present, it may take precedence and break things.)

(This is a maybe- dependency, so it will work even if libctf is
disabled.)

ChangeLog
2021-01-26  Nick Alcock  <nick.alcock@oracle.com>

* Makefile.def: Add install-libctf dependency to install-ld.
* Makefile.in: Regenerated.