]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 29 Apr 2022 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agox86: Properly handle function pointer reference
H.J. Lu [Tue, 26 Apr 2022 16:08:54 +0000 (09:08 -0700)] 
x86: Properly handle function pointer reference

Update

commit ebb191adac4ab45498dec0bfaac62f0a33537ba4
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Feb 9 15:51:22 2022 -0800

    x86: Disallow invalid relocation against protected symbol

to allow function pointer reference and make sure that PLT entry isn't
used for function reference due to function pointer reference.

bfd/

PR ld/29087
* elf32-i386.c (elf_i386_scan_relocs): Don't set
pointer_equality_needed nor check non-canonical reference for
function pointer reference.
* elf64-x86-64.c (elf_x86_64_scan_relocs): Likewise.

ld/

PR ld/29087
* testsuite/ld-x86-64/x86-64.exp: Run PR ld/29087 tests.
* testsuite/ld-x86-64/protected-func-3.c: New file.

(cherry picked from commit 68c4956b1401de70173848a6bdf620cb42fa9358)

3 years agos390: Add DT_JMPREL pointing to .rela.[i]plt with static-pie
Stefan Liebler [Thu, 28 Apr 2022 12:30:55 +0000 (14:30 +0200)] 
s390: Add DT_JMPREL pointing to .rela.[i]plt with static-pie

In static-pie case, there are IRELATIVE-relocs in
.rela.iplt (htab->irelplt), which will later be grouped
to .rela.plt.  On s390, the IRELATIVE relocations are
always located in .rela.iplt - even for non-static case.
Ensure that DT_JMPREL, DT_PLTRELA, DT_PLTRELASZ is added
to the dynamic section even if htab->srelplt->size == 0.
See _bfd_elf_add_dynamic_tags in bfd/elflink.c.

bfd/
elf64-s390.c (elf_s390_size_dynamic_sections):
Enforce DT_JMPREL via htab->elf.dt_jmprel_required.

(cherry picked from commit d942d8db12adf4c9e5c7d9ed6496a779ece7149e)

3 years agos390: Avoid dynamic TLS relocs in PIE
Stefan Liebler [Thu, 28 Apr 2022 12:29:58 +0000 (14:29 +0200)] 
s390: Avoid dynamic TLS relocs in PIE

No dynamic relocs are needed for TLS defined in an executable, the
TP relative offset is known at link time.

Fixes
FAIL: Build pr22263-1

bfd/
PR ld/22263
* elf64-s390.c (elf_s390_tls_transition): Use bfd_link_dll
instead of bfd_link_pic for TLS.
(elf_s390_check_relocs): Likewise.
(allocate_dynrelocs): Likewise.
(elf_s390_relocate_section): Likewise.

(cherry picked from commit 26b1426577b5dcb32d149c64cca3e603b81948a9)

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 28 Apr 2022 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 27 Apr 2022 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 26 Apr 2022 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 25 Apr 2022 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 24 Apr 2022 00:00:34 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 23 Apr 2022 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 22 Apr 2022 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 21 Apr 2022 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 20 Apr 2022 00:01:10 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 19 Apr 2022 00:00:57 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 18 Apr 2022 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 17 Apr 2022 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 16 Apr 2022 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 15 Apr 2022 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 14 Apr 2022 00:01:03 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoLoongArch: Update ABI eflag in elf header.
Liuzhen Song [Wed, 13 Apr 2022 09:39:38 +0000 (10:39 +0100)] 
LoongArch: Update ABI eflag in elf header.

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 13 Apr 2022 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 12 Apr 2022 00:01:05 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 11 Apr 2022 00:00:36 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 10 Apr 2022 00:00:57 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 9 Apr 2022 00:00:48 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 8 Apr 2022 00:01:00 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoIBM zSystems: Add support for z16 as CPU name.
Andreas Krebbel [Thu, 7 Apr 2022 05:45:49 +0000 (07:45 +0200)] 
IBM zSystems: Add support for z16 as CPU name.

So far z16 was identified as arch14. After the machine has been
announced we can now add the real name.

(cherry picked from commit 69341966def7f6551bc4452684136831d6a6941c)

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 7 Apr 2022 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 6 Apr 2022 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 5 Apr 2022 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 4 Apr 2022 00:00:32 +0000 (00:00 +0000)] 
Automatic date update in version.in

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

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 2 Apr 2022 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 1 Apr 2022 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 31 Mar 2022 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 30 Mar 2022 00:00:42 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 29 Mar 2022 00:00:38 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 28 Mar 2022 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 27 Mar 2022 00:00:29 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 26 Mar 2022 00:00:48 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 25 Mar 2022 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agolibctf, ld: diagnose corrupted CTF header cth_strlen
Nick Alcock [Fri, 18 Mar 2022 00:49:11 +0000 (00:49 +0000)] 
libctf, ld: diagnose corrupted CTF header cth_strlen

The last section in a CTF dict is the string table, at an offset
represented by the cth_stroff header field.  Its length is recorded in
the next field, cth_strlen, and the two added together are taken as the
size of the CTF dict.  Upon opening a dict, we check that none of the
header offsets exceed this size, and we check when uncompressing a
compressed dict that the result of the uncompression is the same length:
but CTF dicts need not be compressed, and short ones are not.
Uncompressed dicts just use the ctf_size without checking it.  This
field is thankfully almost unused: it is mostly used when reserializing
a dict, which can't be done to dicts read off disk since they're
read-only.

However, when opening an uncompressed foreign-endian dict we have to
copy it out of the mmaped region it is stored in so we can endian-
swap it, and we use ctf_size when doing that.  When the cth_strlen is
corrupt, this can overrun.

Fix this by checking the ctf_size in all uncompressed cases, just as we
already do in the compressed case.  Add a new test.

This came to light because various corrupted-CTF raw-asm tests had an
incorrect cth_strlen: fix all of them so they produce the expected
error again.

libctf/
PR libctf/28933
* ctf-open.c (ctf_bufopen_internal): Always check uncompressed
CTF dict sizes against the section size in case the cth_strlen is
corrupt.

ld/
PR libctf/28933
* testsuite/ld-ctf/diag-strlen-invalid.*: New test,
derived from diag-cttname-invalid.s.
* testsuite/ld-ctf/diag-cttname-invalid.s: Fix incorrect cth_strlen.
* testsuite/ld-ctf/diag-cttname-null.s: Likewise.
* testsuite/ld-ctf/diag-cuname.s: Likewise.
* testsuite/ld-ctf/diag-parlabel.s: Likewise.
* testsuite/ld-ctf/diag-parname.s: Likewise.

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 24 Mar 2022 00:00:46 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agodlltool: Use the output name as basis for deterministic temp prefixes
Nick Clifton [Wed, 23 Mar 2022 11:39:49 +0000 (11:39 +0000)] 
dlltool: Use the output name as basis for deterministic temp prefixes

PR 28885
* dlltool.c (main): use imp_name rather than dll_name when
generating a temporary file name.

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 23 Mar 2022 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 22 Mar 2022 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 21 Mar 2022 00:00:34 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 20 Mar 2022 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 19 Mar 2022 00:00:29 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 18 Mar 2022 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 17 Mar 2022 00:01:05 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoUpdated Serbian (for binutils/) and Russian (for gprof/) translations
Nick Clifton [Wed, 16 Mar 2022 12:48:55 +0000 (12:48 +0000)] 
Updated Serbian (for binutils/) and Russian (for gprof/) translations

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 16 Mar 2022 00:01:01 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 15 Mar 2022 00:01:11 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 14 Mar 2022 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoPR28959, obdump doesn't disassemble mftb instruction
Alan Modra [Sun, 13 Mar 2022 12:24:25 +0000 (22:54 +1030)] 
PR28959, obdump doesn't disassemble mftb instruction

Without a -M cpu option given, powerpc objdump defaults currently to
-Mpower10 but -Many is also given.  Commit 1ff6a3b8e562 regressed
-Many disassembly of instructions that are encoded differently
depending on cpu, such as mftb which has pre- and post-power4
encodings.

PR 28959
* ppc-dis.c (lookup_powerpc): Revert 2021-05-28 change.  Instead
only look at deprecated PPC_OPCODE_RAW bit when -Many.

(cherry picked from commit b508e46bf9c5b2cef5821b399dfc3b8009a81836)

3 years agoPowerPC64 DT_RELR relative reloc addresses
Alan Modra [Wed, 2 Mar 2022 13:34:57 +0000 (00:04 +1030)] 
PowerPC64 DT_RELR relative reloc addresses

Section addresses can change between ppc64_elf_size_stubs and
ppc64_elf_build_stubs due to .eh_frame editing.  The idea of stashing
r_offset final addresses calculated in ppc64_elf_size_stubs for use by
ppc64_elf_build_stubs was never a good idea.  Instead, we need to keep
section/offset pairs.

* elf64-ppc.c (struct ppc_link_hash_table): Delete relr_addr.
Add relr section/offset array.
(append_relr_off): Rewrite.  Update all callers.
(sort_relr): New function.
(ppc64_elf_size_stubs): Adjust to suit new relative reloc stash.
(ppc64_elf_build_stubs): Likewise.

(cherry picked from commit 0aac2413d39d9f6d9e6879a0daa6bd5dea3e0fe3)
(cherry picked from commit e26ff4b5a90a67fc440052f6101464939347b1f2)

3 years agoWork around gcc-4 warnings in elf64-ppc.c
Alan Modra [Wed, 9 Feb 2022 05:51:02 +0000 (16:21 +1030)] 
Work around gcc-4 warnings in elf64-ppc.c

elf64-ppc.c: In function 'ppc64_elf_size_dynamic_sections':
elf64-ppc.c:10309:45: error: value computed is not used [-Werror=unused-value]
     ++lgot_ents, ++lgot_masks, isym != NULL && isym++)

It is of course a silly warning, fixed in later versions of gcc.  I
wrote "isym != NULL && isym++" rather than the simpler "isym++" to
stop sanitisers complaining about incrementing a NULL pointer.  isym
is of course unused in any code path where it might start off as
NULL.  Sometimes you can't win.  So don't try to be clever in reading
local symbols only when needed.  99 times out of 100 they will be
cached anyway.

* elf64-ppc.c (ppc64_elf_size_dynamic_sections): Avoid annoying
warnings by always reading local syms.
(ppc64_elf_layout_multitoc): Likewise.

(cherry picked from commit c9fecd62838e481d9902a7fba42a6928370c9b10)

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 13 Mar 2022 00:01:04 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 12 Mar 2022 00:00:57 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 11 Mar 2022 00:01:33 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 10 Mar 2022 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 9 Mar 2022 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 8 Mar 2022 00:01:29 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 7 Mar 2022 00:00:39 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 6 Mar 2022 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 5 Mar 2022 00:01:12 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 4 Mar 2022 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 3 Mar 2022 00:01:37 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 2 Mar 2022 00:01:18 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoRevert "Check thin archive element file size against archive header"
Alan Modra [Tue, 1 Mar 2022 11:24:34 +0000 (21:54 +1030)] 
Revert "Check thin archive element file size against archive header"

This reverts commit 48e3e6aec8a4f37d00ea6c0da3ab45e76490e3db.

PR 28929
* archive.c (_bfd_get_elt_at_filepos): Don't check thin archive
element file size.

(cherry picked from commit 581c5ba435538c23fe63d6884ff885b7ef333568)

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 1 Mar 2022 00:01:56 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 28 Feb 2022 00:01:05 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 27 Feb 2022 00:00:57 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 26 Feb 2022 00:01:15 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 25 Feb 2022 00:01:03 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 24 Feb 2022 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agobinutils 2.38 vs. ppc32 linux kernel
Alan Modra [Mon, 21 Feb 2022 00:28:57 +0000 (10:58 +1030)] 
binutils 2.38 vs. ppc32 linux kernel

Commit b25f942e18d6 made .machine more strict.  Weaken it again.

* config/tc-ppc.c (ppc_machine): Treat an early .machine specially,
keeping sticky options to work around gcc bugs.

(cherry picked from commit cebc89b9328eab994f6b0314c263f94e7949a553)

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 23 Feb 2022 00:01:33 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 22 Feb 2022 00:01:12 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 21 Feb 2022 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 20 Feb 2022 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 19 Feb 2022 00:01:19 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 18 Feb 2022 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoUpdated Serbian translations for the bfd, gold, ld and opcodes directories
Nick Clifton [Thu, 17 Feb 2022 15:17:48 +0000 (15:17 +0000)] 
Updated Serbian translations for the bfd, gold, ld and opcodes directories

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 17 Feb 2022 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agold: Keep indirect symbol from IR if referenced from shared object
H.J. Lu [Fri, 11 Feb 2022 23:13:19 +0000 (15:13 -0800)] 
ld: Keep indirect symbol from IR if referenced from shared object

Don't change indirect symbol defined in IR to undefined if it is
referenced from shared object.

bfd/

PR ld/28879
* elflink.c (_bfd_elf_merge_symbol): Don't change indirect
symbol defined in IR to undefined if it is referenced from
shared object.

ld/

PR ld/28879
* testsuite/ld-plugin/lto.exp: Run PR ld/28879 tests.
* testsuite/ld-plugin/pr28879a.cc: New file.
* testsuite/ld-plugin/pr28879b.cc: Likewise.

(cherry picked from commit 20ea3acc727f3be6322dfbd881e506873535231d)

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 16 Feb 2022 00:01:04 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoi386: Update I386_NEED_DYNAMIC_RELOC_TYPE_P for DT_TEXTREL
H.J. Lu [Tue, 15 Feb 2022 23:03:02 +0000 (15:03 -0800)] 
i386: Update I386_NEED_DYNAMIC_RELOC_TYPE_P for DT_TEXTREL

Update I386_NEED_DYNAMIC_RELOC_TYPE_P to allow R_386_TLS_IE for relocation
in read-only section.

bfd/

PR ld/28894
* elfxx-x86.h (I386_NEED_DYNAMIC_RELOC_TYPE_P): Allow
R_386_TLS_IE.

ld/
PR ld/28894
* testsuite/ld-i386/i386.exp: Run pr28894.
* testsuite/ld-i386/pr28894.d: New file.
* testsuite/ld-i386/pr28894.s: Likewise.

(cherry picked from commit 3319ba7a8d6a42ba071d691789bc184632399331)

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 15 Feb 2022 00:01:03 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoPR28882, build failure with gcc-4.2 due to use of 0b literals
Alan Modra [Sat, 12 Feb 2022 23:26:51 +0000 (09:56 +1030)] 
PR28882, build failure with gcc-4.2 due to use of 0b literals

PR 28882
* elf/loongarch.h: Replace binary literals with hex.

(cherry picked from commit ccbaaa36174c2c3184344ee0e6db648491149a33)

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 14 Feb 2022 00:00:37 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 13 Feb 2022 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 12 Feb 2022 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agox86: Disallow invalid relocation against protected symbol
H.J. Lu [Wed, 9 Feb 2022 23:51:22 +0000 (15:51 -0800)] 
x86: Disallow invalid relocation against protected symbol

I am checking this into master and will backport it to 2.38 branch.

H.J
----
On x86, GCC 12 supports -mno-direct-extern-access to enable canonical
reference to protected function and disable copy relocation.  With
-mno-direct-extern-access, the canonical protected function symbols must
be accessed via canonical reference and the protected data symbols in
shared libraries are non-copyable. Under glibc 2.35, non-canonical
reference to the canonical protected function will get the run-time error:

./y: internal_f: ./libfoo.so: non-canonical reference to canonical protected function

and copy relocations against the non-copyable protected symbols will get
the run-time error:

./x: internal_i: ./libfoo.so: copy relocation against non-copyable protected symbol

Update x86 linker to disallow non-canonical reference to the canonical
protected function:

ld: plt.o: non-canonical reference to canonical protected function `internal_f' in libfoo.so
ld: failed to set dynamic section sizes: bad value

and copy relocation against the non-copyable protected symbol:

ld: main.o: copy relocation against non-copyable protected symbol `internal_i' in libfoo.so

at link-time.

bfd/

PR ld/28875
* elf-properties.c (_bfd_elf_parse_gnu_properties): Don't skip
shared libraries for GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS.
* elf32-i386.c (elf_i386_scan_relocs): Disallow non-canonical
reference to canonical protected function.
* elf64-x86-64.c (elf_x86_64_scan_relocs): Likewise.
* elfxx-x86.c (elf_x86_allocate_dynrelocs): Don't allow copy
relocation against non-copyable protected symbol.

ld/

PR ld/28875
* testsuite/ld-i386/i386.exp: Check non-canonical reference to
canonical protected function and check copy relocation against
non-copyable protected symbol.
* testsuite/ld-i386/pr21997-1.err: New file.
* testsuite/ld-i386/pr28875.err: Likewise.
* testsuite/ld-i386/pr28875a.c: Likewise.
* testsuite/ld-i386/pr28875b.c: Likewise.
* testsuite/ld-x86-64/pr21997-1a.err: Updated.
* testsuite/ld-x86-64/pr21997-1b.err: Likewise.
* testsuite/ld-x86-64/pr28875-data.err: New file.
* testsuite/ld-x86-64/pr28875-func.err: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Check non-canonical reference
to canonical protected function and check copy relocation against
non-copyable protected symbol.

(cherry picked from commit ebb191adac4ab45498dec0bfaac62f0a33537ba4)

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 11 Feb 2022 00:01:08 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 10 Feb 2022 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoRe-enable development on the 2.38 branch
Nick Clifton [Wed, 9 Feb 2022 13:35:22 +0000 (13:35 +0000)] 
Re-enable development on the 2.38 branch

3 years agoThis is the 2.38 GNU Binutils release binutils-2_38
Nick Clifton [Wed, 9 Feb 2022 12:01:02 +0000 (12:01 +0000)] 
This is the 2.38 GNU Binutils release

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 9 Feb 2022 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in