[Bug ld/28735] relocation truncated to fit: R_OR1K_GOT16 on OpenRISC, building libgeos

2022-02-02 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=28735

--- Comment #3 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Stafford Horne :

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

commit c7c6e55b60b072cdcc5c3fc27164b890a0f34520
Author: Stafford Horne 
Date:   Wed Feb 2 20:11:56 2022 +0900

or1k: Avoid R_OR1K_GOT16 signed overflow by using special howto

Previously when fixing PR 21464 we masked out upper bits of the
relocation value in order to avoid overflow complaints when acceptable.
It turns out this does not work when the relocation value ends up being
signed.

To fix this this patch introduces a special howto with
complain_on_overflow set to complain_overflow_dont.  This is used in
place of the normal R_OR1K_GOT16 howto when we detect R_OR1K_GOT_AHI16
relocations.

bfd/ChangeLog:

PR 28735
* elf32-or1k.c (or1k_elf_got16_no_overflow_howto): Define.
(or1k_elf_relocate_section): Use new howto instead of trying to
mask out relocation bits.

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


[Bug ld/21464] relocation truncated to fit: R_OR1K_GOT16 on OpenRISC, when linking libQtGui.so.4.8.7

2022-02-02 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=21464

--- Comment #26 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Stafford Horne :

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

commit c7c6e55b60b072cdcc5c3fc27164b890a0f34520
Author: Stafford Horne 
Date:   Wed Feb 2 20:11:56 2022 +0900

or1k: Avoid R_OR1K_GOT16 signed overflow by using special howto

Previously when fixing PR 21464 we masked out upper bits of the
relocation value in order to avoid overflow complaints when acceptable.
It turns out this does not work when the relocation value ends up being
signed.

To fix this this patch introduces a special howto with
complain_on_overflow set to complain_overflow_dont.  This is used in
place of the normal R_OR1K_GOT16 howto when we detect R_OR1K_GOT_AHI16
relocations.

bfd/ChangeLog:

PR 28735
* elf32-or1k.c (or1k_elf_got16_no_overflow_howto): Define.
(or1k_elf_relocate_section): Use new howto instead of trying to
mask out relocation bits.

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


[Bug ld/28849] symbol info passed to linker plugin does not include DT_NEEDED shared libraries

2022-02-02 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28849

--- Comment #1 from H.J. Lu  ---
Created attachment 13949
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13949&action=edit
A testcase without -lfto

[hjl@gnu-tgl-3 pr28849-2]$ make
gcc -O2   -c -o z1.o z1.c
gcc  -shared -fPIC -Wl,-soname,libz3.so -o libz3.so z3.c
gcc  -shared -fPIC -Wl,-soname,libz2.so -o libz2.so z2.c
gcc -Wl,--copy-dt-needed-entries -O2 -o zexec1 -L. -Wl,-R,. z1.o -lz2 -lz3
gcc -Wl,--copy-dt-needed-entries -O2 -o zexec2 -L. -Wl,-R,. z1.o -lz2
/usr/local/bin/ld: z1.o: in function `main':
z1.c:(.text.startup+0x5): undefined reference to `should_be_dynamic_in_exec'
collect2: error: ld returned 1 exit status
make: *** [Makefile:17: zexec2] Error 1
[hjl@gnu-tgl-3 pr28849-2]$

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


[Bug ld/28849] Symbols aren't properly loaded via --copy-dt-needed-entries

2022-02-02 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28849

H.J. Lu  changed:

   What|Removed |Added

Version|unspecified |2.39 (HEAD)
 Ever confirmed|0   |1
   Last reconfirmed||2022-02-02
 Status|UNCONFIRMED |NEW
Summary|symbol info passed to   |Symbols aren't properly
   |linker plugin does not  |loaded via
   |include DT_NEEDED shared|--copy-dt-needed-entries
   |libraries   |

--- Comment #2 from H.J. Lu  ---
Linker doesn't properly load symbols from DT_NEEDED entries included by
--copy-dt-needed-entries.

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


[Bug ld/28849] Symbols aren't properly loaded via --copy-dt-needed-entries

2022-02-02 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28849

--- Comment #3 from H.J. Lu  ---
ldelf_load_symbols should load all shared libraries added by
--copy-dt-needed-entries.

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


[Bug ld/28849] Symbols aren't properly loaded via --copy-dt-needed-entries

2022-02-02 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28849

H.J. Lu  changed:

   What|Removed |Added

  Attachment #13949|0   |1
is obsolete||

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


[Bug ld/28848] [2.38 Regression] ld assertion fail ../../bfd/elf32-arm.c:14807

2022-02-02 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28848

Nick Clifton  changed:

   What|Removed |Added

 CC||nickc at redhat dot com

--- Comment #1 from Nick Clifton  ---
Hi Matthias,

The issue, as I understand it, is that crti.o has a Tag_ABI_HardFP attribute
set
, but no Tag_FP_arch set.  So this results in the initial output file having
the same settings.  Then crtbeginS.o is processed and this has a Tag_FP_arch
set but no Tag_ABI_HardFP.  So the assertion is triggered as you have seen.

Assuming that the comment in the code is correct then it looks like the crti.o
file might be broken.  Ie it should have both of those tags defined (or neither
of them).  Is the file produced from assembler source code or is it compiled ?

Cheers
  Nick

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


[Bug binutils/28834] incorrect detection of "DWARF error: section .debug_str is larger than its filesize"

2022-02-02 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=28834

--- Comment #3 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Nick Clifton :

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

commit 41ba8b76ccc5bb01507beb3b49df039264bcf34a
Author: Nick Clifton 
Date:   Wed Feb 2 17:06:22 2022 +

Stop the BFD library complaining about compressed dwarf debug string
sections being too big.

PR 28834
* dwarf2.c (read_section): Change the heuristic that checks for
overlarge dwarf debug info sections.

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


[Bug binutils/28834] incorrect detection of "DWARF error: section .debug_str is larger than its filesize"

2022-02-02 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=28834

--- Comment #4 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_38-branch branch has been updated by Nick Clifton
:

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

commit 203c99c9b9a9c58cce472a1bd4315e3f79b440b7
Author: Nick Clifton 
Date:   Wed Feb 2 17:07:31 2022 +

Stop the BFD library from complaining that dwarf debug string sections are
too big.

PR 28834
* dwarf2.c (read_section): Change the heuristic that checks for
overlarge dwarf debug info sections.

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


[Bug binutils/28834] incorrect detection of "DWARF error: section .debug_str is larger than its filesize"

2022-02-02 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28834

Nick Clifton  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED

--- Comment #5 from Nick Clifton  ---
Hi Joel,

  Well the 10x fix is easy to implement, and should be safe, so I have
  gone ahead and applied it.

Cheers
  Nick

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


[Bug ld/28849] Symbols aren't properly loaded via --copy-dt-needed-entries

2022-02-02 Thread sandra at codesourcery dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28849

--- Comment #4 from sandra at codesourcery dot com ---
I'm kind of confused, here; both the customer's application and Joseph's test
case linked correctly without -flto, and I used some printf debugging to track
it down to the LTO plugin being called before the normal DT_NEEDED processing
in the after_open hook.  H.J., have you found a different bug that doesn't
depend on LTO?

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


[Bug ld/28841] ld: Customize output section type

2022-02-02 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=28841

--- Comment #1 from Fangrui Song  ---
(I wrote `.note.package (SHT_NOTE)` in a hurry. It's better to introduce a
keyword)

The current proposal is  TYPE=,

+@item TYPE = @var{type}
+Set the section type to the integer @var{type}. When generating an ELF
+output file, type names @code{SHT_PROGBITS}, @code{SHT_STRTAB},
+@code{SHT_NOTE}, @code{SHT_INIT_ARRAY}, @code{SHT_FINI_ARRAY}, and
+@code{SHT_PREINIT_ARRAY} are also allowed for @var{type}.  It is the
+user's responsibility to ensure that any special requirements of the
+section type are met.

Examples:

SECTIONS {
  progbits (TYPE=SHT_PROGBITS) : { BYTE(1) }
  strtab (TYPE = SHT_STRTAB) : { BYTE(0) }
  note (TYPE =SHT_NOTE) : { BYTE(8) }
  init_array (TYPE= 14) : { QUAD(14) }
  fini_array ( TYPE=SHT_FINI_ARRAY) : { QUAD(15) }
  preinit_array (TYPE=SHT_PREINIT_ARRAY ) : { QUAD(16) }
}

Discussion: https://sourceware.org/pipermail/binutils/2022-February/119600.html

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


Issue 40925 in oss-fuzz: binutils:fuzz_strings: Timeout in fuzz_strings

2022-02-02 Thread sheriffbot via monorail
Updates:
Labels: Deadline-Approaching

Comment #3 on issue 40925 by sheriffbot: binutils:fuzz_strings: Timeout in 
fuzz_strings
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40925#c3

This bug is approaching its deadline for being fixed, and will be automatically 
derestricted within 7 days. If a fix is planned within 2 weeks after the 
deadline has passed, a grace extension can be granted.

- Your friendly Sheriffbot

-- 
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.

Issue 40915 in oss-fuzz: binutils:fuzz_dlltool: Global-buffer-overflow in xstrdup

2022-02-02 Thread sheriffbot via monorail
Updates:
Labels: Deadline-Approaching

Comment #3 on issue 40915 by sheriffbot: binutils:fuzz_dlltool: 
Global-buffer-overflow in xstrdup
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40915#c3

This bug is approaching its deadline for being fixed, and will be automatically 
derestricted within 7 days. If a fix is planned within 2 weeks after the 
deadline has passed, a grace extension can be granted.

- Your friendly Sheriffbot

-- 
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.

Issue 40903 in oss-fuzz: binutils:fuzz_dlltool: Use-of-uninitialized-value in xstrdup

2022-02-02 Thread sheriffbot via monorail
Updates:
Labels: Deadline-Approaching

Comment #3 on issue 40903 by sheriffbot: binutils:fuzz_dlltool: 
Use-of-uninitialized-value in xstrdup
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40903#c3

This bug is approaching its deadline for being fixed, and will be automatically 
derestricted within 7 days. If a fix is planned within 2 weeks after the 
deadline has passed, a grace extension can be granted.

- Your friendly Sheriffbot

-- 
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.

[Bug ld/28735] relocation truncated to fit: R_OR1K_GOT16 on OpenRISC, building libgeos

2022-02-02 Thread shorne at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=28735

Stafford Horne  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #4 from Stafford Horne  ---
This patch should fix it.

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


Issue 40689 in oss-fuzz: binutils:fuzz_objdump: Out-of-memory in fuzz_objdump

2022-02-02 Thread sheriffbot via monorail
Updates:
Labels: -restrict-view-commit -deadline-approaching Deadline-Exceeded

Comment #4 on issue 40689 by sheriffbot: binutils:fuzz_objdump: Out-of-memory 
in fuzz_objdump
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40689#c4

This bug has exceeded our disclosure deadline. It has been opened to the public.

- Your friendly Sheriffbot

-- 
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.

[Bug ld/28855] New: [2.38 Regression] ld fails to build gnat on x86_64-linux-gnux32

2022-02-02 Thread doko at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=28855

Bug ID: 28855
   Summary: [2.38 Regression] ld fails to build gnat on
x86_64-linux-gnux32
   Product: binutils
   Version: 2.38
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: doko at debian dot org
  Target Milestone: ---

seen with the binutils 2.38 branch:

/usr/bin/x86_64-linux-gnux32-ld: s-trasym.o: in function
`system__traceback__symbolic__module_name__getXnn':
/<>/build/gcc/ada/rts/s-tsmona.adb:160: undefined reference to
`dladdr'
collect2: error: ld returned 1 exit status
make[7]: *** [gcc-interface/Makefile:681: gnatlib-shared-default] Error 1

this started when building GCC 11 with the new binutils.
https://buildd.debian.org/status/logs.php?pkg=gcc-11&arch=x32

checked that it still builds with binutils 2.37.

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


[Bug ld/28855] [2.38 Regression] ld fails to build gnat on x86_64-linux-gnux32

2022-02-02 Thread doko at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=28855

Matthias Klose  changed:

   What|Removed |Added

 CC||hjl at sourceware dot org
 Target||x86_64-linux-gnux32

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


[Bug ld/28849] Symbols aren't properly loaded via --copy-dt-needed-entries

2022-02-02 Thread dpmendenhall at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28849

David Mendenhall  changed:

   What|Removed |Added

 CC||dpmendenhall at gmail dot com

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


[Bug ld/28855] [2.38 Regression] ld fails to build gnat on x86_64-linux-gnux32

2022-02-02 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28855

H.J. Lu  changed:

   What|Removed |Added

 CC|hjl at sourceware dot org  |hjl.tools at gmail dot 
com

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


[Bug ld/28849] Symbols aren't properly loaded via --copy-dt-needed-entries

2022-02-02 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28849

--- Comment #5 from H.J. Lu  ---
Created attachment 13954
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13954&action=edit
A patch

Try this.

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


[Bug ld/28849] Symbols aren't properly loaded via --copy-dt-needed-entries

2022-02-02 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28849

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

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


[Bug ld/28855] [2.38 Regression] ld fails to build gnat on x86_64-linux-gnux32

2022-02-02 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28855

--- Comment #1 from H.J. Lu  ---
It looks like missing the -ldl command-line option.

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


[Bug ld/28844] ld (bfd) segfaults on building efivar-38 with -flto

2022-02-02 Thread sam at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=28844

Sam James  changed:

   What|Removed |Added

 Resolution|--- |OBSOLETE
 Status|WAITING |RESOLVED

--- Comment #11 from Sam James  ---
(In reply to Nick Clifton from comment #10)
> (In reply to Sam James from comment #9)
> 
> > I can't reproduce with master nor the binutils-2.38 branch, excellent!
> 
> In which case are you happy if we close this PR ?

Yeah, thank you all! Happy to close.

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


[Bug ld/28849] Symbols aren't properly loaded via --copy-dt-needed-entries

2022-02-02 Thread sandra at codesourcery dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28849

--- Comment #6 from sandra at codesourcery dot com ---
That looks like the same patch I was starting to write.  :-)  It fixes the test
case and regression tests OK, but I probably need another day to try it out on
the customer's application.

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