[Bug ld/31179] RISC-V: The SET/ADD/SUB fix breaks ABI compatibility with 2.41 objects

2023-12-19 Thread palmer at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=31179

--- Comment #3 from Palmer Dabbelt  ---
(In reply to David Abdurachmanov from comment #2)
> To add some context here. Debian is using pre-2.42 bintuils, and GCC 13
> failed to build:
> 
> [..]
> riscv64-linux-gnu-gdc-12 -no-pie -lstdc++   -g -DIN_GCC -fno-exceptions
> -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
> -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute
> -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long
> -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
> -static-libstdc++ -static-libgcc  -static-libphobos -o d21 \
>   d/access.o d/aggregate.o d/aliasthis.o d/apply.o d/arrayop.o 
> d/arraytypes.o
> d/attrib.o d/ast_node.o d/astcodegen.o d/astenums.o d/blockexit.o
> d/builtin.o d/canthrow.o d/chkformat.o d/clone.o d/common-bitfields.o
> d/common-file.o d/common-outbuffer.o d/common-string.o d/compiler.o d/cond.o
> d/constfold.o d/cparse.o d/cppmangle.o d/ctfeexpr.o d/ctorflow.o d/dcast.o
> d/dclass.o d/declaration.o d/delegatize.o d/denum.o d/dimport.o
> d/dinterpret.o d/dmacro.o d/dmangle.o d/dmodule.o d/doc.o d/dscope.o
> d/dstruct.o d/dsymbol.o d/dsymbolsem.o d/dtemplate.o d/dtoh.o d/dversion.o
> d/entity.o d/errors.o d/errorsink.o d/escape.o d/expression.o
> d/expressionsem.o d/file_manager.o d/foreachvar.o d/func.o d/globals.o
> d/gluelayer.o d/hdrgen.o d/iasm.o d/iasmgcc.o d/id.o d/identifier.o
> d/impcnvtab.o d/imphint.o d/importc.o d/init.o d/initsem.o d/inline.o
> d/intrange.o d/json.o d/lambdacomp.o d/lexer.o d/location.o d/mtype.o
> d/mustuse.o d/nogc.o d/nspace.o d/ob.o d/objc.o d/opover.o d/optimize.o
> d/parse.o d/parsetimevisitor.o d/permissivevisitor.o d/printast.o
> d/root-aav.o d/root-array.o d/root-bitarray.o d/root-complex.o
> d/root-ctfloat.o d/root-file.o d/root-filename.o d/root-hash.o
> d/root-longdouble.o d/root-optional.o d/root-port.o d/root-region.o
> d/root-rmem.o d/root-rootobject.o d/root-speller.o d/root-string.o
> d/root-stringtable.o d/root-utf.o d/safe.o d/sapply.o d/semantic2.o
> d/semantic3.o d/sideeffect.o d/statement.o d/statement_rewrite_walker.o
> d/statementsem.o d/staticassert.o d/staticcond.o d/stmtstate.o d/target.o
> d/templateparamsem.o d/tokens.o d/traits.o d/transitivevisitor.o d/typesem.o
> d/typinf.o d/utils.o d/visitor.o d/d-attribs.o d/d-builtins.o d/d-codegen.o
> d/d-compiler.o d/d-convert.o d/d-ctfloat.o d/d-diagnostic.o d/d-frontend.o
> d/d-gimplify.o d/d-incpath.o d/d-lang.o d/d-longdouble.o d/d-port.o
> d/d-target.o d/decl.o d/expr.o d/imports.o d/intrinsics.o d/modules.o
> d/runtime.o d/toir.o d/typeinfo.o d/types.o riscv-d.o linux-d.o attribs.o
> libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a
> ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a  
> ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a
> ../libdecnumber/libdecnumber.a  -lisl -lmpc -lmpfr -lgmp -rdynamic  -lz
> -lzstd 
> /usr/bin/ld: final size of uleb128 value at offset 0x1491 in .debug_loclists
> from /usr/lib/gcc/riscv64-linux-gnu/12/libgphobos.a(aaA.o) exceeds available
> space
> /usr/lib/gcc/riscv64-linux-gnu/12/libgphobos.a(aaA.o): in function `.LLST1':
> aaA.d:(.debug_loclists+0x1491): dangerous relocation: dangerous relocation
> error
> /usr/bin/ld: final size of uleb128 value at offset 0xe92 in .debug_loclists
> from /usr/lib/gcc/riscv64-linux-gnu/12/libgphobos.a(deh.o) exceeds available
> space
> /usr/lib/gcc/riscv64-linux-gnu/12/libgphobos.a(deh.o): in function `.LLST1':
> deh.d:(.debug_loclists+0xe92): dangerous relocation: dangerous relocation
> error
> collect2: error: ld returned 1 exit status
> make[5]: *** [../../src/gcc/d/Make-lang.in:236: d21] Error 1
> make[5]: *** Waiting for unfinished jobs
> [..]

Can you point me at that libgphobos.a?  I'd like to poke around in objdump...

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/31179] RISC-V: The SET/ADD/SUB fix breaks ABI compatibility with 2.41 objects

2023-12-19 Thread palmer at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=31179

--- Comment #4 from Palmer Dabbelt  ---
(In reply to Palmer Dabbelt from comment #0)
> 2029e13917d ("RISC-V: Clarify the behaviors of SET/ADD/SUB relocations.")

I guess also a question for the distro folks, but are we sure this commit is
actually what's breaking things?  Nelson said that patch only changes the
behavior of .reloc, but as far as I can tell it also changes .uleb128.  Maybe
I'm just missing something?

It reverts cleanly, so if someone still has a setup that's failing then I think
it should be easy to check.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/31179] RISC-V: The SET/ADD/SUB fix breaks ABI compatibility with 2.41 objects

2023-12-19 Thread sch...@linux-m68k.org
https://sourceware.org/bugzilla/show_bug.cgi?id=31179

--- Comment #5 from Andreas Schwab  ---
There are a lot of SUB_ULEB128 relocations with a non-zero addend in installed
static archives that will change behaviour with this commit.

$ readelf -Wr /usr/lib64/libc.a | grep -c 'SUB_ULEB128.*[+-] [^0]'
17043
$ readelf -Wr /usr/lib64/gcc/riscv64-suse-linux/13/libgphobos.a | grep -c
'SUB_ULEB128.*[+-] [^0]'
55318

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/31169] [display text] Source code locations can not be found in a C++ application

2023-12-19 Thread kurt.goebel at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31169

Kurt Goebel  changed:

   What|Removed |Added

   Priority|P3  |P2
 CC||kurt.goebel at oracle dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/30438] [display html] Assertion error in function structure creation

2023-12-19 Thread kurt.goebel at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=30438

Kurt Goebel  changed:

   What|Removed |Added

 CC||kurt.goebel at oracle dot com
   Priority|P3  |P2

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/30439] [display html] Assertion error in caller-callee structure creation

2023-12-19 Thread kurt.goebel at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=30439

Kurt Goebel  changed:

   What|Removed |Added

 CC||kurt.goebel at oracle dot com
   Priority|P3  |P2

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/31109] gprofng not built and installed in a combined binutils+gcc build

2023-12-19 Thread vladimir.mezentsev at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31109

--- Comment #10 from Vladimir Mezentsev  
---
I don't have permissions for `git push`.
I fixed the problem after:

% git branch
  master
* releases/gcc-13
  trunk

% git cherry-pick 24552056fd5fc677c0d032f54a5cad1c4303d312
Performing inexact rename detection: 100% (322524/322524), done.
Auto-merging configure.ac
Auto-merging configure
Auto-merging Makefile.in
Auto-merging Makefile.def
[releases/gcc-13 d7f1ea5edb2] gprofng: a new GNU profiler
 Date: Fri Mar 11 08:58:31 2022 +
 7 files changed, 744 insertions(+)
 create mode 100644 include/collectorAPI.h
 create mode 100644 include/libcollector.h
 create mode 100644 include/libfcollector.h

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/31145] potential memory leak in binutils/ld

2023-12-19 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=31145

--- Comment #4 from Sourceware Commits  ---
The master branch has been updated by Alan Modra :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cf86e13d8bfc2924746b8e45299aed103d090985

commit cf86e13d8bfc2924746b8e45299aed103d090985
Author: Alan Modra 
Date:   Wed Dec 20 08:29:12 2023 +1030

Re: PR31145, potential memory leak in binutils/ld

Revert most of this patch, it isn't correct to free the BFD_IN_MEMORY
iostream in io_reinit.

PR 31145
* format.c (io_reinit): Revert last change.  Comment.
* opncls.c (_bfd_delete_bfd): Likewise.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/31145] potential memory leak in binutils/ld

2023-12-19 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31145

Alan Modra  changed:

   What|Removed |Added

 Resolution|FIXED   |NOTABUG

--- Comment #5 from Alan Modra  ---
On looking at this report again, I don't believe there is a memory leak here.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/31169] [display text] Source code locations can not be found in a C++ application

2023-12-19 Thread vladimir.mezentsev at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31169

Vladimir Mezentsev  changed:

   What|Removed |Added

   See Also||https://sourceware.org/bugz
   ||illa/show_bug.cgi?id=31121

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/31121] gprofng does not recognise source in a shared object

2023-12-19 Thread vladimir.mezentsev at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31121

Vladimir Mezentsev  changed:

   What|Removed |Added

   See Also||https://sourceware.org/bugz
   ||illa/show_bug.cgi?id=31169

--- Comment #12 from Vladimir Mezentsev  
---
> $ gprofng display text -functions test.1.er | grep bin2SD
> /usr/bin/gp-display-text: Processed 
> /home/robj/TMP/DesignOfIIRFilters/.gprofng.rc for default settings
> $

gprofng interrupts your application every 10007 msec and collects the stacks.
We see that there are no “*bin2SD” functions.
This means that gprofng did not collect the stack with Fbin2SD.
It's okay if Fbin2SD is that fast.
But this can become a problem when unwinding the stack.
What is an output of:
  gprofng display text -calltree test.1.er


> $ gprofng display text -source Fbin2SD test.1.er
> /usr/bin/gp-display-text: Processed 
> /home/robj/TMP/DesignOfIIRFilters/.gprofng.rc for default settings
> Error: Source location not recorded in experiment

This means that gprofng found Fbin2SD in src/bin2SD.oct, but cannot read DWARF.
you have attached bin2SD.oct.tar.gz. gprofng can read DWARF in this file.
But it looks like a different file (Perhaps it was rebuilt).
Could you attach test.1.er/archives/bin2SD.oct*.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/31179] RISC-V: The SET/ADD/SUB fix breaks ABI compatibility with 2.41 objects

2023-12-19 Thread palmer at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=31179

--- Comment #6 from Palmer Dabbelt  ---
(In reply to Andreas Schwab from comment #5)
> There are a lot of SUB_ULEB128 relocations with a non-zero addend in
> installed static archives that will change behaviour with this commit.
> 
> $ readelf -Wr /usr/lib64/libc.a | grep -c 'SUB_ULEB128.*[+-] [^0]'
> 17043
> $ readelf -Wr /usr/lib64/gcc/riscv64-suse-linux/13/libgphobos.a | grep -c
> 'SUB_ULEB128.*[+-] [^0]'
> 55318

Awesome, thanks.  Nelson and I were getting some confusing error reports, but
this matches what I was trying to fix at the beginning.  We might have another
bug, but I think this one we can try to fix.

So I think we can do something like the following:
* Check for binaries with the bug -- I think we want a tag here, but I guess we
could also try and pattern match the +N/+N vs +M/+0.
* If the binary has the bug, then revert to the old linker behavior for
calculating the addresses from the input.
* Always emit correct addends into the output.

Then we can add some some warning when we detect the old inputs, along with
some commandline/autoconf arguments to turn the warnings into errors.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gold/31182] New: /usr/bin/ld.gold: internal error in try_fix_erratum_843419_optimized, at ../../gold/aarch64.cc:2114

2023-12-19 Thread behrooze at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31182

Bug ID: 31182
   Summary: /usr/bin/ld.gold: internal error in
try_fix_erratum_843419_optimized, at
../../gold/aarch64.cc:2114
   Product: binutils
   Version: unspecified
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: gold
  Assignee: ccoutant at gmail dot com
  Reporter: behrooze at gmail dot com
CC: ian at airs dot com
  Target Milestone: ---

I appear to be hitting an internal assertion in the gold linker causing linking
to fail. It is 100% reproducible for a particular build target. A slight change
in the source code can get rid of the issue, which I assume is by chance the
problematic assembly sequence is not generated.

I was able to reproduce this on binutils 2.41 as well as on 2.34

I can work around this by downgrading the optimization level to `-O1`. I also
found that I can work around this by disabling the errata fix via
`--no-fix-cortex-a53-843419` option. However, I do not want to disable it given
that it is meant to work around a hardware erratum.

If needed, I can provide more information about my build environment.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/31169] [display text] Source code locations can not be found in a C++ application

2023-12-19 Thread vladimir.mezentsev at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31169

Vladimir Mezentsev  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/30699] objcopy: '--only-keep-debug for ELF relocatables' test fails

2023-12-19 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=30699

--- Comment #9 from Sourceware Commits  ---
The binutils-2_41-branch branch has been updated by Sam James
:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=83d5e7b750556c9c7389a888bf1e3bfc33622b58

commit 83d5e7b750556c9c7389a888bf1e3bfc33622b58
Author: Nick Clifton 
Date:   Tue Aug 1 14:37:04 2023 +0100

Fix "--only-keep-debug for ELF relocatables" binutils test for compilers
which add .debug_macro sections to object files.

  PR 30699
  * binutils/testsuite/binutils-all/objcopy.exp
(keep_debug_symbols_for_elf_relocatable): Do not add sections containing the
string "debug_" to the list of non-debug sections.

(cherry picked from commit b99a9693430a9f04165b1b868f890b622bb1b46c)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/30734] ld: 'relocatable with script' test fails on hppa

2023-12-19 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=30734

--- Comment #5 from Sourceware Commits  ---
The binutils-2_41-branch branch has been updated by Sam James
:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=493b2c96a5634439266fa32d0f1b5b8e5d422373

commit 493b2c96a5634439266fa32d0f1b5b8e5d422373
Author: Sam James 
Date:   Tue Aug 8 02:17:57 2023 +0100

ld: Fix relocatable.d XFAIL/notarget entry for hppa

PR 30734
* ld/testsuite/ld-elf/relocatable.d: Fix notarget entry for hppa to match
  hppa{1.1,2.0}*, like hppa2.0-unknown-linux-gnu which Gentoo uses.

Signed-off-by: Sam James 
(cherry picked from commit 0e339f6b4f2df25ed351cb94dc7fe16868626f49)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/30700] tmpdir/gp-collect-app_F test fails

2023-12-19 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=30700

--- Comment #15 from Sourceware Commits  ---
The binutils-2_41-branch branch has been updated by Sam James
:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1ce656c66f1859d0f6066e0f9064033712e37aea

commit 1ce656c66f1859d0f6066e0f9064033712e37aea
Author: Vladimir Mezentsev 
Date:   Thu Aug 3 12:56:54 2023 -0700

gprofng: 30700 tmpdir/gp-collect-app_F test fails

gprofng/ChangeLog
2023-08-03  Vladimir Mezentsev  

PR gprofng/30700
* testsuite/gprofng.display/gp-collect-app_F.exp: Fix -name
argument
for sub-experiment filtering.

(cherry picked from commit e0282cf1284b4d358892427a6b4f60d6f4c0580b)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/30698] ld test 'Run pr23169b' fails

2023-12-19 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=30698

--- Comment #9 from Sourceware Commits  ---
The binutils-2_41-branch branch has been updated by Sam James
:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=34d8c9d5b4e4fc62bea212b6bd046f26a177df4c

commit 34d8c9d5b4e4fc62bea212b6bd046f26a177df4c
Author: H.J. Lu 
Date:   Mon Aug 7 10:23:16 2023 -0700

ld: Build libpr23169a.so with -z lazy

pr23169b test only works with lazy binding.  To work with linker which
disables lazy binding by default, build pr23169b binaries with -z lazy.

PR ld/30698
* ld-ifunc/ifunc.exp: Build pr23169b binaries with -z lazy.

(cherry picked from commit 51dd9e7c4cab13748f31f6575aed0672f03d6710)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/30734] ld: 'relocatable with script' test fails on hppa

2023-12-19 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=30734

--- Comment #6 from Sourceware Commits  ---
The binutils-2_41-branch branch has been updated by Sam James
:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a23e3d64517f0763cad9ad522c234fcdd7c20117

commit a23e3d64517f0763cad9ad522c234fcdd7c20117
Author: Sam James 
Date:   Mon Aug 14 04:28:35 2023 +0100

ld: fix relocatable, retain7a target pattens for HPPA

Fix issue reported by Dave and Alan.

Put back the old pattern for hppa-*-linux* and add hppa[12]*-*-linux* to
cover
Gentoo's hppa1.1 and hppa2.0 without including hppa64 inadvertently like I
did
before.

ld/
PR 30733
PR 30734
* ld/testsuite/ld-elf/relocatable.d: Use better pattern to exclude
hppa64
  but include hppa1.1, hppa2.0.
* ld/testsuite/ld-elf/retain7a.d: Ditto.

Fixes: 0e339f6b4f2df25ed351cb94dc7fe16868626f49
Fixes: e3b66187192ce6840df283c00f6395bb0ff15cf5
Signed-off-by: Sam James 
(cherry picked from commit 3b23a5ea693deee60648c9a9e9d666d83549298e)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/30733] ld: SHF_GNU_RETAIN 7a' test fail on hppa

2023-12-19 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=30733

--- Comment #6 from Sourceware Commits  ---
The binutils-2_41-branch branch has been updated by Sam James
:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a23e3d64517f0763cad9ad522c234fcdd7c20117

commit a23e3d64517f0763cad9ad522c234fcdd7c20117
Author: Sam James 
Date:   Mon Aug 14 04:28:35 2023 +0100

ld: fix relocatable, retain7a target pattens for HPPA

Fix issue reported by Dave and Alan.

Put back the old pattern for hppa-*-linux* and add hppa[12]*-*-linux* to
cover
Gentoo's hppa1.1 and hppa2.0 without including hppa64 inadvertently like I
did
before.

ld/
PR 30733
PR 30734
* ld/testsuite/ld-elf/relocatable.d: Use better pattern to exclude
hppa64
  but include hppa1.1, hppa2.0.
* ld/testsuite/ld-elf/retain7a.d: Ditto.

Fixes: 0e339f6b4f2df25ed351cb94dc7fe16868626f49
Fixes: e3b66187192ce6840df283c00f6395bb0ff15cf5
Signed-off-by: Sam James 
(cherry picked from commit 3b23a5ea693deee60648c9a9e9d666d83549298e)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/30733] ld: SHF_GNU_RETAIN 7a' test fail on hppa

2023-12-19 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=30733

--- Comment #5 from Sourceware Commits  ---
The binutils-2_41-branch branch has been updated by Sam James
:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c636a9548aa241f9525979f1bcb3e7a19cf70fb4

commit c636a9548aa241f9525979f1bcb3e7a19cf70fb4
Author: Sam James 
Date:   Tue Aug 8 02:19:57 2023 +0100

ld: Fix retain7a.d XFAIL/notarget entry for hppa

PR 30733
* ld/testsuite/ld-elf/retain7a.d: Fix XFAIL entry for hppa to match
  hppa{1.1,2.0}*, like hppa2.0-unknown-linux-gnu which Gentoo uses.

Signed-off-by: Sam James 
(cherry picked from commit e3b66187192ce6840df283c00f6395bb0ff15cf5)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/30722] ld tests 'Build property 3', 'Build property 4', 'Build property 5' fail (glibc-2.38?)

2023-12-19 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=30722

--- Comment #18 from Sourceware Commits  ---
The binutils-2_41-branch branch has been updated by Sam James
:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b3e64983c42c9b943b5c5aaee27c252ea4ae3533

commit b3e64983c42c9b943b5c5aaee27c252ea4ae3533
Author: Jan Beulich 
Date:   Tue Nov 7 13:58:32 2023 +0100

ld/x86: reduce testsuite dependency on system object files

PR ld/30722
Tests looking for certain .note-section recorded properties may not
involve object files from the underlying platform (e.g. via using the C
compiler for linking): Such object files may themselves have similar
note sections, and hence they may influence the overall outcome.

For now convert just the tests known to be affected by crt*.o coming
with "ISA v3 needed" notes. Eventually other tests ought to be
converted, too.

(cherry picked from commit eab996435fe65a421541f59557c5f1fd427573a3)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/30808] gprofng tests failed

2023-12-19 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=30808

--- Comment #3 from Sourceware Commits  ---
The binutils-2_41-branch branch has been updated by Sam James
:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ad9049e6da186e8317916dc2d0c89002d6a5e0f9

commit ad9049e6da186e8317916dc2d0c89002d6a5e0f9
Author: Vladimir Mezentsev 
Date:   Thu Aug 31 16:26:59 2023 -0700

Fix 30808 gprofng tests failed

In gprofng testing, we need a tempory gprofng installation to resolve
run-time
dependencies on libraries (libgprofng, libopcodes, libbfd, etc).
We set LD_LIBRARY_PATH and GPROFNG_SYSCONFDIR to find our libraries and
configuration file. These variables must be set for all gprofng tests.

Tested on aarch64 and x86_64 with and without --enable-shared and
--target=<>.

gprofng/ChangeLog
2023-08-31  Vladimir Mezentsev  

PR gprofng/30808
* testsuite/config/default.exp: Make a temporary install dir.
Set LD_LIBRARY_PATH, GPROFNG_SYSCONFDIR.
* testsuite/lib/Makefile.skel: Move LD_LIBRARY_PATH and
GPROFNG_SYSCONFDIR setting in testsuite/config/default.exp.

(cherry picked from commit a13e4c5c10d1a13d9128d033c9525810e876ac14)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/30722] ld tests 'Build property 3', 'Build property 4', 'Build property 5' fail (glibc-2.38?)

2023-12-19 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=30722

--- Comment #19 from Sourceware Commits  ---
The binutils-2_41-branch branch has been updated by Sam James
:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=64707a2e11d16bb2cf3a90e486d89d96ea3d

commit 64707a2e11d16bb2cf3a90e486d89d96ea3d
Author: H.J. Lu 
Date:   Fri Dec 1 09:13:08 2023 -0800

Fix ld/x86: reduce testsuite dependency on system object files

commit eab996435fe65a421541f59557c5f1fd427573a3
Author: Jan Beulich 
Date:   Tue Nov 7 13:58:32 2023 +0100

ld/x86: reduce testsuite dependency on system object files

changed some C compiler tests to assembler/linker tests which introduced
2 problems:

1. It broke x32 binutils tests since --64 was passed to assembler, but
-m elf_x86_64 wasn't passed to linker.
2. -nostdlib was passed to C compiler driver to exclude standard run-time
files which should be avoided with -r option for linker tests.

Fix them by passing -m elf_x86_64 to linker and removing -nostdlib for
linker tests with -r.

PR ld/30722
* testsuite/ld-x86-64/x86-64.exp: Pass -m elf_x86_64 to linker
for tests with --64.  Remove -nostdlib for tests with -r.

(cherry picked from commit 260aa570edcf120332daefb4a102a08c90e4d9b4)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/31179] RISC-V: The SET/ADD/SUB fix breaks ABI compatibility with 2.41 objects

2023-12-19 Thread nelsonc1225 at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=31179

Nelson Chu  changed:

   What|Removed |Added

 CC||nelsonc1225 at sourceware dot 
org

--- Comment #7 from Nelson Chu  ---
Created attachment 15267
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15267&action=edit
proposed solution v1

I'm running the regressions of riscv-gnu-toolchain, so will send the patch if
everything looks well.  Basically the root cause of the problem is same as what
Andreas mentioned, and the proposed solution is also same as what Palmer said,
so just make sure that what the proposed patch plan to do in the short-term,

For 2.42 assembler,
- Keep generating the right zero addend of SUB_ULEB128 relocation.

For 2.42 linker,
- Ignore the addend of SUB_ULEB128 relocation when relocating since it should
always be zero by using .ueb128 directive.
- Add ld target option, --[no-]check-uleb128, to enable/disable checking if
SUB_ULEB128 with non-zero addend.  If people get warnings by enabling the
option, then,
1. they should plan to rebuild their stuff to get the right behavior in
assembler.
2. they probably are using .reloc *SUB* with non-zero addend, then they will
get troubles temporarily.  Since the .reloc usage is rarely to use in RISC-V,
so there is much room for discussion in terms of use.  That means maybe we
should just encourage people don't use that, or add some limitation for it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/31121] gprofng does not recognise source in a shared object

2023-12-19 Thread robertjenssen at ozemail dot com.au
https://sourceware.org/bugzilla/show_bug.cgi?id=31121

--- Comment #13 from Robert Jenssen  ---
Created attachment 15268
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15268&action=edit
Compressed bin2SD.oct shared object from test.1.er/archives

Replying to comment #12. bin2SD.oct from test.1.er/archives is attached.

I modified the Octave test script for bin2SD to loop 1000 times.

$ gprofng display text -source Fbin2SD test.1.er
/usr/bin/gp-display-text: Processed
/home/robj/TMP/DesignOfIIRFilters/.gprofng.rc for default settings
Error: Source location not recorded in experiment

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/31121] gprofng does not recognise source in a shared object

2023-12-19 Thread robertjenssen at ozemail dot com.au
https://sourceware.org/bugzilla/show_bug.cgi?id=31121

--- Comment #14 from Robert Jenssen  ---
Created attachment 15269
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15269&action=edit
Output of "gprofng display text -calltree test.1.er"

Replying to comment #12. Note that gprofng sees functions from Octave shared
libraries. For example:

$ objdump -T /usr/local/octave-9.0.0/lib/octave/9.0.0/liboctinterp.so | grep
clear_functions
00aaa07c gDF .text  0019  Base   
_ZN6octave11interpreter15clear_functionsEb
00bd69ee gDF .text  0044  Base   
_ZN6octave12symbol_table15clear_functionsEb
$ grep clear_functions gprofng_calltree.txt 
0.010 100.00  
+-octave::symbol_table::clear_functions(bool)
$ grep bin2SD gprofng_calltree.txt 
$

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/31121] gprofng does not recognise source in a shared object

2023-12-19 Thread vladimir.mezentsev at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31121

--- Comment #15 from Vladimir Mezentsev  
---
If you run:

% gp-display-src -dis Fbin2SD test.1.er/archives/bin2SD.oct_IGooCa1n7J2
Annotated disassembly
---
Source file: /home/robj/TMP/DesignOfIIRFilters/src/bin2SD.cc (not found)
Object file: test.1.er/archives/bin2SD.oct_IGooCa1n7J2
Load Object: test.1.er/archives/bin2SD.oct_IGooCa1n7J2


[  35] 33d2:  push   %r14
[  35] 33d4:  push   %r13
[  35] 33d6:  push   %r12
[  35] 33d8:  push   %rbp
[  35] 33d9:  push   %rbx



 Do you see a correct name in the "Source file:" field ?
If not, what is in your /home/robj/TMP/DesignOfIIRFilters/.gprofng.rc ?

-- 
You are receiving this mail because:
You are on the CC list for the bug.