]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 24 Sep 2022 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 23 Sep 2022 00:01:48 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoelf: Reset alignment for each PT_LOAD segment
H.J. Lu [Mon, 1 Aug 2022 23:02:39 +0000 (16:02 -0700)] 
elf: Reset alignment for each PT_LOAD segment

Reset alignment for each PT_LOAD segment to avoid using alignment from
the previous PT_LOAD segment.

bfd/

PR ld/29435
* elf.c (assign_file_positions_for_load_sections): Reset
alignment for each PT_LOAD segment.

ld/

PR ld/29435
* testsuite/ld-elf/pr29435.d: New file.
* testsuite/ld-elf/pr29435.s: Likewise.

(cherry picked from commit 59f214544c50ec7ebbca285ff2b4949f48671690)

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 22 Sep 2022 00:02:20 +0000 (00:02 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 21 Sep 2022 00:01:29 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoRe: PowerPC64 pcrel got relocs against local symbols
Alan Modra [Tue, 20 Sep 2022 23:36:29 +0000 (09:06 +0930)] 
Re: PowerPC64 pcrel got relocs against local symbols

The last patch wasn't all that shiny.  There are rather a lot more
relocations that can hit the assertion in md_apply_fix if the symbol
is local or absolute.  Fix them all.

* config/tc-ppc.c (ppc_force_relocation): Add all relocs that
expect a symbol in md_apply_fix.  Remove tls pcrel relocs
already covered in general tls match range.

(cherry picked from commit 8b168f1a1e09e337d2a970f204a0230c091bbe58)

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 20 Sep 2022 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 19 Sep 2022 00:01:16 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 18 Sep 2022 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 17 Sep 2022 00:01:01 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoPowerPC64 pcrel got relocs against local symbols
Alan Modra [Fri, 16 Sep 2022 08:38:44 +0000 (18:08 +0930)] 
PowerPC64 pcrel got relocs against local symbols

Not that anyone would want to indirect via the GOT when an address can
be loaded directly with pla, the following:

 pld 3,x@got@pcrel
x:

leads to "Internal error in md_apply_fix", because the generic parts
of assembler fixup handling convert the fx_pcrel fixup to one without
a symbol.  Stop that happening.

* config/tc-ppc.c (ppc_force_relocation): Add PLT_PCREL34 and
assorted GOT_PCREL34 relocs.

(cherry picked from commit 49c3ed081fed6b8e2b48fdc48f805f11e4589514)

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 16 Sep 2022 00:00:39 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 15 Sep 2022 00:01:05 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 14 Sep 2022 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 13 Sep 2022 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 12 Sep 2022 00:00:37 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 11 Sep 2022 00:01:18 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoRe: PR29466, APP/NO_APP with linefile
Alan Modra [Fri, 9 Sep 2022 22:00:57 +0000 (07:30 +0930)] 
Re: PR29466, APP/NO_APP with linefile

It looks like I copied the SIZE init across from
binutils/testsuite/config/default.exp without some necessary editing.

PR 29466
* testsuite/config/default.exp (SIZE): Adjust relative path.

(cherry picked from commit 1180f540d5f2f7751b5309bdd6c38d69fcf699e7)

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 10 Sep 2022 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 9 Sep 2022 00:01:00 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 8 Sep 2022 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoLoongArch:ld: Fix relocation error of pcrel.
liuzhensong [Fri, 2 Sep 2022 08:29:14 +0000 (16:29 +0800)] 
LoongArch:ld: Fix relocation error of pcrel.

  Patch for branch 2.39.
  Need to reduce the address of pc when using
  reloction R_LARCH_SOP_PUSH_PCREL.

  bfd/
    * elfnn-loongarch.c

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 7 Sep 2022 00:00:38 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 6 Sep 2022 00:00:38 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 5 Sep 2022 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

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

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

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 2 Sep 2022 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 1 Sep 2022 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 31 Aug 2022 00:00:36 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 30 Aug 2022 00:01:02 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 29 Aug 2022 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 28 Aug 2022 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 27 Aug 2022 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 26 Aug 2022 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 25 Aug 2022 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 24 Aug 2022 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 23 Aug 2022 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 22 Aug 2022 00:00:37 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 21 Aug 2022 00:05:27 +0000 (00:05 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 20 Aug 2022 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 19 Aug 2022 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 18 Aug 2022 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

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

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 16 Aug 2022 00:01:06 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 15 Aug 2022 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 14 Aug 2022 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 13 Aug 2022 00:00:32 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 12 Aug 2022 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoPR29466, APP/NO_APP with .linefile
Alan Modra [Thu, 11 Aug 2022 00:21:03 +0000 (09:51 +0930)] 
PR29466, APP/NO_APP with .linefile

Commit 53f2b36a54b9 exposed a bug in sb_scrub_and_add_sb that could
result in losing input.  If scrubbing results in expansion past the
holding capacity of do_scrub_chars output buffer, then do_scrub_chars
stashes the extra input for the next call.  That call never came
because sb_scrub_and_add_sb wrongly decided it was done.  Fix that by
allowing sb_scrub_and_add_sb to see whether there is pending input.
Also allow a little extra space so that in most cases we won't need
to resize the output buffer.

sb_scrub_and_add_sb also limited output to the size of the input,
rather than the actual output buffer size.  Fixing that resulted in a
fail of gas/testsuite/macros/dot with an extra warning: "end of file
not at end of a line; newline inserted".  OK, so the macro in dot.s
really does finish without end-of-line.  Apparently the macro
expansion code relied on do_scrub_chars returning early.  So fix that
too by adding a newline if needed in macro_expand_body.

PR 29466
* app.c (do_scrub_pending): New function.
* as.h: Declare it.
* input-scrub.c (input_scrub_include_sb): Add extra space for
two .linefile directives.
* sb.c (sb_scrub_and_add_sb): Take into account pending input.
Allow output to max.
* macro.c (macro_expand_body): Add terminating newline.
* testsuite/config/default.exp (SIZE, SIZEFLAGS): Define.
* testsuite/gas/macros/app5.d,
* testsuite/gas/macros/app5.s: New test.
* testsuite/gas/macros/macros.exp: Run it.

(cherry picked from commit 4d74aab7aa562fe79d4669cdad0c32610531cbc0)

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 11 Aug 2022 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoPR29462, internal error in relocate, at powerpc.cc:10796
Alan Modra [Wed, 10 Aug 2022 01:08:52 +0000 (10:38 +0930)] 
PR29462, internal error in relocate, at powerpc.cc:10796

Prior to the inline plt call support (commit 08be322439), the only
local syms with plt entries were local ifunc symbols.  There shouldn't
be stubs for other local symbols so don't look for them.  The patch
also fixes minor bugs in get_reference_flags; Many relocs are valid
only for ppc64 and a couple only for ppc32.

PR 29462
* powerpc.cc (Target_powerpc::Relocate::relocate): Rename
use_plt_offset to pltcal_to_direct, invert logic.  For relocs
not used with inline plt sequences against local symbols, only
look for stubs when the symbol is an ifunc.
(Target_powerpc::Scan::get_reference_flags): Correct reloc
handling for relocs not valid for both 32-bit and 64-bit.

(cherry picked from commit 6158b25f77db11712b84e6a4609898f2615ac749)

2 years agogas/Dwarf: properly skip zero-size functions
Jan Beulich [Wed, 10 Aug 2022 08:34:22 +0000 (10:34 +0200)] 
gas/Dwarf: properly skip zero-size functions

PR gas/29451

While out_debug_abbrev() properly skips such functions, out_debug_info()
mistakenly didn't. It needs to calculate the high_pc expression ahead of
time, in order to skip emitting any data for the function if the value
is zero.

The one case which would still leave a zero-size entry is when
symbol_get_obj(symp)->size ends up evaluating to zero. I hope we can
expect that to not be the case, otherwise we'd need to have a way to
post-process .debug_info contents between resolving expressions and
actually writing the data out to the file. Even then it wouldn't be
entirely obvious in which way to alter the data.

(cherry picked from commit d7abcbcea5ddd40a3bf28758b62f35933c59f996)

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 10 Aug 2022 00:00:48 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 9 Aug 2022 00:01:01 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agold: fix NEWS typos
Martin Liska [Mon, 8 Aug 2022 11:22:26 +0000 (13:22 +0200)] 
ld: fix NEWS typos

ld/ChangeLog:

* NEWS: Fix 2 typos.

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 8 Aug 2022 00:00:34 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 7 Aug 2022 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 6 Aug 2022 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoreset development to true. update version number
Nick Clifton [Fri, 5 Aug 2022 13:02:43 +0000 (14:02 +0100)] 
reset development to true.  update version number

2 years agoRestore accidentally deleted version.texi file binutils-2_39
Nick Clifton [Fri, 5 Aug 2022 10:29:10 +0000 (11:29 +0100)] 
Restore accidentally deleted version.texi file

2 years agorestore allocfail.sh
Nick Clifton [Fri, 5 Aug 2022 10:27:52 +0000 (11:27 +0100)] 
restore allocfail.sh

2 years agoThis is the 2.39 release
Nick Clifton [Fri, 5 Aug 2022 10:26:37 +0000 (11:26 +0100)] 
This is the 2.39 release

2 years agoThis is the 2.39 release
Nick Clifton [Fri, 5 Aug 2022 10:07:32 +0000 (11:07 +0100)] 
This is the 2.39 release

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 5 Aug 2022 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 4 Aug 2022 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agogprofng: fix bug 29410 - Argument " 0." isn't numeric in numeric gt (>)
Ruud van der Pas [Tue, 2 Aug 2022 17:13:48 +0000 (10:13 -0700)] 
gprofng: fix bug 29410 - Argument " 0." isn't numeric in numeric gt (>)

gprofng/Changelog:
2022-08-02  Ruud van der Pas  <ruud.vanderpas@oracle.com>

PR gprofng/29410
* gp-display-html/gp-display-html.in: Remove non-breaking spaces.

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

2 years agold: aarch64: Update test linker scripts relocs.ld and relocs-ilp32.ld
Matthew Malcomson [Tue, 2 Aug 2022 11:12:26 +0000 (12:12 +0100)] 
ld: aarch64: Update test linker scripts relocs.ld and relocs-ilp32.ld

The updates are to ensure that the .data section exists.  This means
that we always have a data section.  That means that we don't create a
RWX segment and avoid the corresponding warning.

We get this warning when testing aarch64-none-elf with -mcmodel=tiny.
N.b. this changes quite a few testcases from fail to pass.

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 2 Aug 2022 00:00:48 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agolibctf: Avoid use of uninitialised variables
Alan Modra [Sun, 31 Jul 2022 13:21:55 +0000 (22:51 +0930)] 
libctf: Avoid use of uninitialised variables

* ctf-link.c (ctf_link_add_ctf_internal): Don't free uninitialised
pointers.

(cherry picked from commit 9ea6fffe1ebec9bd1929c708e044b765eabea258)

3 years agoPR29348, BFD_VMA_FMT wrong
Alan Modra [Sun, 31 Jul 2022 09:55:32 +0000 (19:25 +0930)] 
PR29348, BFD_VMA_FMT wrong

There is a problem with my commit 0e3c1eebb2, which replaced
bfd_uint64_t with uint64_t: Some hosts typedef int64_t to long long
even when long is the same size as long long.  That confuses the code
choosing one of "l", "ll", or "I64" for BFD_VMA_FMT, and results in
warnings.

Write a direct configure test for the printf int64_t style instead.
This removes the last use of BFD_HOST_64BIT_LONG, so delete that.
Note that the changes to configure.com are pure guesswork.

PR 29348
* bfd-in.h (BFD_HOST_64BIT_LONG): Don't define.
(BFD_VMA_FMT): Define using BFD_INT64_FMT when 64-bit.
(bfd_vma, bfd_signed_vma): Move comments to 64-bit typedefs.
* configure.ac (BFD_HOST_64BIT_LONG): Delete.
(BFD_INT64_FMT): New config test.
* configure.com: Update similarly.
* Makefile.in: Regenerate.
* bfd-in2.h: Regenerate.
* configure: Regenerate.

(cherry picked from commit 1a5178fe284547ef2abd8ae66588c9999d61c524)

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 1 Aug 2022 00:00:46 +0000 (00:00 +0000)] 
Automatic date update in version.in

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

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 30 Jul 2022 00:00:38 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoStop the linker from complaining about unrecognized DW_FORM_rnglistx and DW_FORM_locl...
Nick Clifton [Fri, 29 Jul 2022 12:00:09 +0000 (13:00 +0100)] 
Stop the linker from complaining about unrecognized DW_FORM_rnglistx and DW_FORM_loclistx attribute formats.

PR 29424
* dwarf2.c (read_attribute_value): Handle DW_FORM_rnglistx and
DW_FORM_loclistx.

3 years agold: Extend ac_default_ld_warn_rwx_segments to all SPARC targets [PR29411]
Rainer Orth [Fri, 29 Jul 2022 07:04:59 +0000 (09:04 +0200)] 
ld: Extend ac_default_ld_warn_rwx_segments to all SPARC targets [PR29411]

As discussed in PR ld/29411, the ld warning

[...] has a LOAD segment with RWX permissions

needs to be disabled on all SPARC targets, not just Solaris/SPARC: the
.plt section is required to be RWX by the 32-bit SPARC ELF psABI and the
64-bit SPARC Compliance Definition 2.4.1.  Given that ld only supports
SPARC ELF targets, this patch implements this.

Tested on sparc64-unknown-linux-gnu and sparc-sun-solaris2.11.

2022-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

ld:
PR ld/29411
* configure.tgt (ac_default_ld_warn_rwx_segments): Extend to all
sparc targets.  Expand comment.

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 29 Jul 2022 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 28 Jul 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, 27 Jul 2022 00:01:35 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agogprofng: check for the makeinfo version
Vladimir Mezentsev [Tue, 26 Jul 2022 06:57:46 +0000 (23:57 -0700)] 
gprofng: check for the makeinfo version

gprofng/ChangeLog
2022-07-25  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

PR gprofng/29368
* configure.ac: Check for the makeinfo version.
* configure: Rebuild.

3 years agoStop the linker from complaining about RWX segments on sparc-solaris targets.
Nick Clifton [Tue, 26 Jul 2022 13:31:13 +0000 (14:31 +0100)] 
Stop the linker from complaining about RWX segments on sparc-solaris targets.

PR 29411
* configure.tgt (ac_default_ld_warn_rwx_segments): Disable for
sparc-solaris configurations.

3 years agoPowerPC32 ld test fails with --enable-targets=all
Alan Modra [Tue, 26 Jul 2022 12:31:39 +0000 (22:01 +0930)] 
PowerPC32 ld test fails with --enable-targets=all

Three pppc32 ld tests fail when spu support is included in the linker
due to this snippet in ld/emulparams/elf32ppc.sh.

if grep -q 'ld_elf32_spu_emulation' ldemul-list.h; then
  DATA_START_SYMBOLS="${RELOCATING+*crt1.o(.data .data.* .gnu.linkonce.d.*)
    PROVIDE (__spe_handle = .);
    *(.data.spehandle)
    . += 4 * (DEFINED (__spe_handle) || . != 0);}"
fi

* testsuite/ld-powerpc/tlsexe32.r: Pass with .data section present.
* testsuite/ld-powerpc/tlsexe32no.r: Likewise.
* testsuite/ld-powerpc/tlsso32.r: Likewise.

(cherry picked from commit c138af95731c630a78329fd86076992f82099957)

3 years agoUpdated translations for various sub-directories
Nick Clifton [Tue, 26 Jul 2022 12:11:59 +0000 (13:11 +0100)] 
Updated translations for various sub-directories

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

3 years agogprofng: fix bug 29356 - Execution fails if gprofng is not included in PATH
Ruud van der Pas [Fri, 22 Jul 2022 13:15:12 +0000 (06:15 -0700)] 
gprofng: fix bug 29356 - Execution fails if gprofng is not included in PATH

gprofng/Changelog:
2022-07-22  Ruud van der Pas  <ruud.vanderpas@oracle.com>

PR gprofng/29356
* gp-display-html/gp-display-html.in: fixed a problem to execute
gp-display-text in case gprofng is not included in the search
path.

3 years agogprofng: fix bug 29392 - Unexpected line format in summary file
Ruud van der Pas [Fri, 22 Jul 2022 12:59:17 +0000 (05:59 -0700)] 
gprofng: fix bug 29392 - Unexpected line format in summary file

gprofng/Changelog:
2022-07-22  Ruud van der Pas  <ruud.vanderpas@oracle.com>

PR gprofng/29392
* gp-display-html/gp-display-html.in: modified a regex, plus the
code to handle the results; renamed a variable to improve the
consistency in naming.

3 years agogprofng: fix bug 29353 - Fix a lay-out issue in the html disassembly files
Ruud van der Pas [Fri, 22 Jul 2022 13:21:49 +0000 (06:21 -0700)] 
gprofng: fix bug 29353 - Fix a lay-out issue in the html disassembly files

gprofng/Changelog:
2022-07-22  Ruud van der Pas  <ruud.vanderpas@oracle.com>

PR gprofng/29353
* gp-display-html/gp-display-html.in: fixed a problem in the
generation of html for the disassembly where instructions
without arguments were not handled correctly.

3 years agogprofng: fix bug 29352 - Fix the message Hexadecimal number > 0xffffffff non-portable
Ruud van der Pas [Fri, 22 Jul 2022 13:27:41 +0000 (06:27 -0700)] 
gprofng: fix bug 29352 - Fix the message Hexadecimal number > 0xffffffff non-portable

gprofng/Changelog:
2022-07-22  Ruud van der Pas  <ruud.vanderpas@oracle.com>

PR gprofng/29352
* gp-display-html/gp-display-html.in: the hex subroutine from
the bigint module is now used.

3 years agogprofng: fix bug 29351 - Move dynamic loading of modules to a later stage
Ruud van der Pas [Fri, 22 Jul 2022 13:32:51 +0000 (06:32 -0700)] 
gprofng: fix bug 29351 - Move dynamic loading of modules to a later stage

gprofng/Changelog:
2022-07-22  Ruud van der Pas  <ruud.vanderpas@oracle.com>

PR gprofng/29351
* gp-display-html/gp-display-html.in: the dynamic loading of
modules occurred too early, resulting in the generation of the
man page to fail in case a module is missing; the loading part is
now done somewhat later in the execution to avoid this problem.

3 years agox86: Disallow invalid relocations against protected symbols
H.J. Lu [Tue, 19 Jul 2022 01:24:26 +0000 (18:24 -0700)] 
x86: Disallow invalid relocations against protected symbols

Since glibc 2.36 will issue warnings for copy relocation against
protected symbols and non-canonical reference to canonical protected
functions, change the linker to always disallow such relocations.

bfd/

* elf32-i386.c (elf_i386_scan_relocs): Remove check for
elf_has_indirect_extern_access.
* elf64-x86-64.c (elf_x86_64_scan_relocs): Likewise.
(elf_x86_64_relocate_section): Remove check for
elf_has_no_copy_on_protected.
* elfxx-x86.c (elf_x86_allocate_dynrelocs): Check for building
executable instead of elf_has_no_copy_on_protected.
(_bfd_x86_elf_adjust_dynamic_symbol): Disallow copy relocation
against non-copyable protected symbol.
* elfxx-x86.h (SYMBOL_NO_COPYRELOC): Remove check for
elf_has_no_copy_on_protected.

ld/

* testsuite/ld-i386/i386.exp: Expect linker error for PR ld/17709
test.
* testsuite/ld-i386/pr17709.rd: Removed.
* testsuite/ld-i386/pr17709.err: New file.
* testsuite/ld-x86-64/pr17709.rd: Removed.
* testsuite/ld-x86-64/pr17709.err: New file.
* testsuite/ld-x86-64/pr28875-func.err: Updated.
* testsuite/ld-x86-64/x86-64.exp: Expect linker error for PR
ld/17709 test.  Add tests for function pointer against protected
function.

(cherry picked from commit f638657759f5b9b4eb31a1aa6b9fe6e6fb01f4a0)

3 years agox86: Make protected symbols local for -shared
Fangrui Song [Sat, 25 Jun 2022 17:44:26 +0000 (10:44 -0700)] 
x86: Make protected symbols local for -shared

Call _bfd_elf_symbol_refs_local_p with local_protected==true.  This has
2 noticeable effects for -shared:

* GOT-generating relocations referencing a protected data symbol no
  longer lead to a GLOB_DAT (similar to a hidden symbol).
* Direct access relocations (e.g. R_X86_64_PC32) no longer has the
  confusing diagnostic below.

    __attribute__((visibility("protected"))) void *foo() {
      return (void *)foo;
    }

    // gcc -fpic -shared -fuse-ld=bfd
    relocation R_X86_64_PC32 against protected symbol `foo' can not be used when making a shared object

The new behavior matches arm, aarch64 (commit
83c325007c5599fa9b60b8d5f7b84842160e1d1b), and powerpc ports, and other
linkers: gold and ld.lld.

Note: if some code tries to use direct access relocations to take the
address of foo, the pointer equality will break, but the error should be
reported on the executable link, not on the innocent shared object link.
glibc 2.36 will give a warning at relocation resolving time.

With this change, `#define elf_backend_extern_protected_data 1` is no
longer effective.  Just remove it.

Remove the test "Run protected-func-1 without PIE" since -fno-pic
address taken operation in the executable doesn't work with protected
symbol in a shared object by default.  Similarly, remove
protected-data-1a and protected-data-1b.  protected-data-1b can be made
working by removing HAVE_LD_PIE_COPYRELOC from GCC
(https://sourceware.org/pipermail/gcc-patches/2022-June/596678.html).

(cherry picked from commit d19a265487eda186b6977d9d15648cda9fad3298)

3 years agoRe: PowerPC64 .branch_lt address
Alan Modra [Sun, 24 Jul 2022 23:55:49 +0000 (09:25 +0930)] 
Re: PowerPC64 .branch_lt address

On seeing PR29369 my suspicion was naturally on a recent powerpc64
change, commit 0ab80031430e.  Without a reproducer, I spent time
wondering what could have gone wrong, and while I doubt this patch
would have fixed the PR, there are some improvements that can be made
to cater for user silliness.

I also noticed that when -z relro -z now sections are created out of
order, with .got before .plt in the section headers but .got is laid
out at a higher address.  That's due to the address expression for
.branch_lt referencing SIZEOF(.got) and so calling init_os (which
creates a bfd section) for .got before the .plt section is created.
Fix that by ignoring SIZEOF in exp_init_os.  Unlike ADDR and LOADADDR
which need to reference section vma and lma respectively, SIZEOF can
and does cope with a missing bfd section by returning zero for its
size, which of course is correct.

PR 29369
* ldlang.c (exp_init_os): Don't create a bfd section for SIZEOF.
* emulparams/elf64ppc.sh (OTHER_RELRO_SECTIONS_2): Revise
.branch_lt address to take into account possible user sections
with alignment larger than 8 bytes.

(cherry picked from commit 5d471bd907be60e9858b22cdf4fd10ddc0f6ee1a)

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

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 24 Jul 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, 23 Jul 2022 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoi386: Don't allow GOTOFF relocation against IFUNC symbol for PIC
H.J. Lu [Thu, 21 Jul 2022 17:35:58 +0000 (10:35 -0700)] 
i386: Don't allow GOTOFF relocation against IFUNC symbol for PIC

We can't use the PLT entry as the function address for PIC since the PIC
register may not be set up properly for indirect call.

bfd/

PR ld/27998
* elf32-i386.c (elf_i386_relocate_section): Don't allow GOTOFF
relocation against IFUNC symbol for PIC.

ld/

PR ld/27998
* testsuite/ld-i386/pr27998a.d: Replace -shared with -e bar.
* testsuite/ld-i386/pr27998b.d: Expect a linker error.
* testsuite/ld-ifunc/ifunc-2-i386-now.d: Updated.
* testsuite/ld-ifunc/ifunc-2-local-i386-now.d: Likewise.
* testsuite/ld-ifunc/ifunc-2-i386.s: Replace @GOTOFF with @GOT.
* testsuite/ld-ifunc/ifunc-2-local-i386.s: Likewise.

(cherry picked from commit 8f29211c3f0a6335c17e0a90396c146facf6dba4)

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

3 years agoPowerPC: Create new MMA instruction masks and use them
Peter Bergner [Wed, 20 Jul 2022 23:16:05 +0000 (18:16 -0500)] 
PowerPC: Create new MMA instruction masks and use them

The MMA instructions use XX3_MASK|3<<21 as an instruction mask, but that
misses the RC bit/bit 31, so if we disassemble a .long that represents an
MMA instruction except that it also has bit 31 set, we will erroneously
disassemble it to that MMA instruction.  We create new masks defines that
contain bit 31 so that doesn't happen anymore.

opcodes/
* ppc-opc.c (XACC_MASK, XX3ACC_MASK): New defines.
(P_GER_MASK, xxmfacc, xxmtacc, xxsetaccz, xvi8ger4pp, xvi8ger4,
xvf16ger2pp, xvf16ger2, xvf32gerpp, xvf32ger, xvi4ger8pp, xvi4ger8,
xvi16ger2spp, xvi16ger2s, xvbf16ger2pp, xvbf16ger2, xvf64gerpp,
xvf64ger, xvi16ger2, xvf16ger2np, xvf32gernp, xvi8ger4spp, xvi16ger2pp,
xvbf16ger2np, xvf64gernp, xvf16ger2pn, xvf32gerpn, xvbf16ger2pn,
xvf64gerpn, xvf16ger2nn, xvf32gernn, xvbf16ger2nn, xvf64gernn: Use them.

(cherry picked from commit 0a246853439422e12a0ccb9191be638aab3987eb)

3 years agox86: replace wrong attributes on VCVTDQ2PH{X,Y}
Jan Beulich [Thu, 21 Jul 2022 10:37:07 +0000 (12:37 +0200)] 
x86: replace wrong attributes on VCVTDQ2PH{X,Y}

A standalone (without SAE) StaticRounding attribute is meaningless, and
indeed all other similar insns have ATTSyntax there instead. I can only
assume this was some strange copy-and-paste mistake.

(cherry picked from commit ea09fe92596fbb2a5da4595459bfe8b23789ec8d)