[Bug binutils/11513] Garbage is loaded into asection#lineno

2023-01-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=11513

Alan Modra  changed:

   What|Removed |Added

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

--- Comment #6 from Alan Modra  ---
It seems likely this isn't a bug in bfd, but rather in a user program trying to
use bfd.  In any case, the bug is too old.

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


[Bug gold/11466] gold fails to build Linux kernel

2023-01-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=11466

Alan Modra  changed:

   What|Removed |Added

 CC||ian at airs dot com
  Component|binutils|gold

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


[Bug binutils/11430] nm crashes when handling some lib file.

2023-01-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=11430

Alan Modra  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Alan Modra  ---
I believe this has been fixed.

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


[Bug gas/11412] .fill: Error: bad or irreducible absolute expression

2023-01-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=11412

Alan Modra  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #2 from Alan Modra  ---
gas is a one-pass assembler.  The value of 1f isn't defined at the time .fill
is processed, and we don't have a mechanism to defer output of .fill as we do
via fixups for the .byte expression.

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


[Bug binutils/11386] objcopy should be able to update dynamic symbols visibility

2023-01-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=11386

Alan Modra  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Alan Modra  ---
No, we don't do that.  It's part of the more general rule that objcopy doesn't
modify loaded sections in final-linked objects.

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


[Bug binutils/11383] bin2c cannot link because it requires libintl

2023-01-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=11383

Alan Modra  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #2 from Aymeric Vincent  ---
Subject: Re:  bin2c cannot link because it requires libintl

Ah, thanks.

Regards,
  Aymeric

On 03/17/10 08:26, amodra at gmail dot com wrote:
> --- Additional Comments From amodra at gmail dot com  2010-03-17 07:26 
> ---
> Fixed on mainline http://sourceware.org/ml/binutils/2010-01/msg00336.html
>


--- Comment #3 from Alan Modra  ---
I'm not sure why this one wasn't closed long ago.

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


[Bug binutils/11129] Sun Studio compiler doesn't understand -Wno-error and __FUNCTION__

2023-01-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=11129

Alan Modra  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Alan Modra  ---
Fixed, and I'm about to switch over binutils sources to use __func__ rather
than __FUNCTION__.

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


[Bug binutils/11128] Test for readelf is failing

2023-01-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=11128

Alan Modra  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #6 from Alan Modra  ---
$subject fixed by Nick, and comment #4 is 13 years old so likely obsolete

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


[Bug binutils/11066] c++filt does not unmangle function types correctly

2023-01-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=11066

Alan Modra  changed:

   What|Removed |Added

 Resolution|--- |OBSOLETE
 Status|NEW |RESOLVED

--- Comment #2 from Alan Modra  ---
Likely fixed as per comment #1

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


[Bug binutils/9897] objcopy --keep-global-symbol not working for COFF files

2023-01-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=9897

Alan Modra  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #1 from Alan Modra  ---
Seems to work for PE at least.  Don't reopen without a testcase demonstrating
what doesn't work.

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


[Bug gprofng/29987] bfd/archive.c:1447: undefined reference to `filename_ncmp'

2023-01-11 Thread vladimir.mezentsev at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29987

Vladimir Mezentsev  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
 Ever confirmed|0   |1
   Last reconfirmed||2023-01-12

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


[Bug gprofng/29470] [test suite] The test suite should be made more flexible

2023-01-11 Thread vladimir.mezentsev at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29470

Vladimir Mezentsev  changed:

   What|Removed |Added

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

--- Comment #1 from Vladimir Mezentsev  
---
Update status as resolved/fixed after these commits:
6b7d3204b5a gprofng/testsuite: restrict testing to native configurations
b1fb5034045 gprofng/testsuite: skip Java test without JDK
f8b6a781fb6 gprofng/testsuite: eliminate bogus casts
08b50e1e03b gprofng/testsuite: correct line continuation in endcases.c
6cafa878248 gprofng/testsuite: correct names for signal handling tests
ecb828308c8 gprofng/testsuite: adjust linking of synprog

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


[Bug gas/6717] gas incorrectly associates .loc with instructions

2023-01-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=6717

Alan Modra  changed:

   What|Removed |Added

 Resolution|--- |WONTFIX
 Status|NEW |RESOLVED

--- Comment #1 from Alan Modra  ---
Closing since it seems no one is interested in fixing this corner case.

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


[Bug binutils/6915] readelf -S segfaults on Solaris-specific section types

2023-01-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=6915
Bug 6915 depends on bug 6412, which changed state.

Bug 6412 Summary: New binutils is incompatible with old object files with 
section numbers >65536
https://sourceware.org/bugzilla/show_bug.cgi?id=6412

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |OBSOLETE

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


[Bug binutils/6412] New binutils is incompatible with old object files with section numbers >65536

2023-01-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=6412

Alan Modra  changed:

   What|Removed |Added

 Resolution|--- |OBSOLETE
 Status|NEW |RESOLVED

--- Comment #6 from Alan Modra  ---
Surely no longer even a small problem.

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


[Bug binutils/2580] Link failed _bfd_mips_elf32_gprel16_reloc.

2023-01-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=2580

Alan Modra  changed:

   What|Removed |Added

 Resolution|--- |NOTABUG
 Status|NEW |RESOLVED

--- Comment #1 from Alan Modra  ---
Yes, much of bfd isn't partitioned well to files. 
_bfd_mips_elf32_gprel16_reloc belongs in elfxx-mips.c not just due to the
reference in elfxx-mips.c but also due to references in all of elf64-mips.c,
elf32-mips.c, and elfn32-mips.c.  I'm reluctant to move it just for a very old
bug report about a version of config.bfd not in the current sources.

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


[Bug binutils/3237] readelf fails to dump complete DWARF 3 info

2023-01-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=3237

--- Comment #1 from Alan Modra  ---
(In reply to H.J. Lu from comment #0)
> When "readelf -w" is used on client.o in

The client-*.o found in
https://sourceware.org/bugzilla/attachment.cgi?id=1307

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


[Bug binutils/5278] objdump SEGFAULT in _bfd_pe_print_private_bfd_data_common

2023-01-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=5278

Alan Modra  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED
   Severity|critical|normal

--- Comment #4 from Alan Modra  ---
I believe this has been fixed.

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


[Bug binutils/17947] S-Record handling read out of bounds

2023-01-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17947

Alan Modra  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Severity|critical|normal

--- Comment #3 from Alan Modra  ---
Fixed with commit bd25671c6f20

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


[Bug binutils/29616] The help document of readelf misses some options

2023-01-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29616

Alan Modra  changed:

   What|Removed |Added

   Severity|critical|normal

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


[Bug gprofng/29935] Callers of Java 'itable stubs' are wrong on aarch64

2023-01-11 Thread kurt.goebel at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29935

Kurt Goebel  changed:

   What|Removed |Added

   Priority|P2  |P3

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


[Bug ld/13671] gld creates i386 relocations not supported by Solaris ld.so.1

2023-01-11 Thread ro at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=13671

Rainer Orth  changed:

   What|Removed |Added

  Attachment #14568|0   |1
is obsolete||

--- Comment #27 from Rainer Orth  ---
Created attachment 14577
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14577=edit
Augmented patch, incorporating review comments

Like so?  I wonder if it would be possible to move the declaration of
expected_tls_le to its use.  Given that binutils now requires C99, that would
certainly be clearer, but differ in style from the rest of the file.

Tested on i386-pc-solaris2.11 and i686-pc-linux-gnu as well as a full
all-languages
gcc bootstrap.

As an additional experiment, I've enabled ld-i386/tls.exp on Solaris/x86. 
Before
this patch, only two tests FAIL:

FAIL: TLS GD/LD -> IE transition without PLT
FAIL: TLS GD/LD -> IE transition without PLT (-z now)

The error is the expected

Running: tmpdir/tls-1d > tmpdir/tls-1d.out
ld.so.1: tls-1d: fatal: relocation error: R_386_UNKNOWN37: file tmpdir/tls-1d:
symbol gd: offset size (0 bytes) is not supported

With the patch, those two tests continue to FAIL.  However, the error is
different:

/var/gcc/binutils/i386/obj/binutils-2.40-branch-local/ld/tmpdir/ld/collect-ld:
warning: /usr/lib/crtn.o: missing .note.GNU-stack section implies executable
stack
/var/gcc/binutils/i386/obj/binutils-2.40-branch-local/ld/tmpdir/ld/collect-ld:
NOTE: This behaviour is deprecated and will be removed in a future version of
the linker
/var/gcc/binutils/i386/obj/binutils-2.40-branch-local/ld/tmpdir/ld/collect-ld:
BFD (GNU Binutils) 2.39.90.20230111 assertion fail
/vol/src/gnu/binutils/hg/binutils-2.40-branch/local/bfd/elf32-i386.c:3377
/var/gcc/binutils/i386/obj/binutils-2.40-branch-local/ld/tmpdir/ld/collect-ld:
BFD (GNU Binutils) 2.39.90.20230111 assertion fail
/vol/src/gnu/binutils/hg/binutils-2.40-branch/local/bfd/elf32-i386.c:3377
/var/gcc/binutils/i386/obj/binutils-2.40-branch-local/ld/tmpdir/ld/collect-ld:
BFD (GNU Binutils) 2.39.90.20230111 assertion fail
/vol/src/gnu/binutils/hg/binutils-2.40-branch/local/bfd/elf32-i386.c:3377
collect2: error: ld returned 1 exit status

On top of that, there are four new failures

+FAIL: TLS GD/LD -> LE transition without PLT (dynamic)
+FAIL: TLS GD/LD -> LE transition without PLT (dynamic, -z now)
+FAIL: TLS GD/LD -> LE transition without PLT (PIE)
+FAIL: TLS GD/LD -> LE transition without PLT (PIE, -z now)

which show the same error.

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


[Bug gprofng/29987] bfd/archive.c:1447: undefined reference to `filename_ncmp'

2023-01-11 Thread dilyan.palauzov at aegee dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=29987

--- Comment #3 from dilyan.palauzov at aegee dot org  ---
You are right:

# cd /usr/local/lib64
# ls libibe* -ld
-rw-r--r-- 1 root staff 397474 Apr 24  2017 libiberty.a
# mv libiberty.a libiberty.a.bak

Now the build works.

Nevertheless the build shall prefer its own libiberty.a .

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


[Bug binutils/29988] AddressSanitizer: heap-buffer-overflow /binutils-gdb/bfd/libbfd.c:784 in bfd_getl64

2023-01-11 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29988

Nick Clifton  changed:

   What|Removed |Added

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

--- Comment #3 from Nick Clifton  ---
Hi,

  Thanks for reporting this bug.  There was a check in the
read_indexed_address() function for a buffer overflow, but it was testing
against the wrong size field.  I have checked in a small patch to fix this.

Cheers
  Nick

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


[Bug binutils/29988] AddressSanitizer: heap-buffer-overflow /binutils-gdb/bfd/libbfd.c:784 in bfd_getl64

2023-01-11 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29988

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

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

commit 3e307d538c351aa9327cbad672c884059ecc20dd
Author: Nick Clifton 
Date:   Wed Jan 11 12:13:46 2023 +

Fix a potential illegal memory access in the BFD library when parsing a
corrupt DWARF file.

PR 29988
* dwarf2.c (read_indexed_address): Fix check for an out of range
offset.

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


[Bug binutils/29988] AddressSanitizer: heap-buffer-overflow /binutils-gdb/bfd/libbfd.c:784 in bfd_getl64

2023-01-11 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29988

--- Comment #1 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=11d171f1910b508a81d21faa087ad1af573407d8

commit 11d171f1910b508a81d21faa087ad1af573407d8
Author: Nick Clifton 
Date:   Wed Jan 11 12:12:25 2023 +

Fix a potential illegal memory access in the BFD library when parsing a
corrupt DWARF file.

PR 29988
* dwarf2.c (read_indexed_address): Fix check for an out of range
offset.

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


[Bug binutils/29988] AddressSanitizer: heap-buffer-overflow /binutils-gdb/bfd/libbfd.c:784 in bfd_getl64

2023-01-11 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29988

Nick Clifton  changed:

   What|Removed |Added

   Last reconfirmed||2023-01-11
 Status|UNCONFIRMED |ASSIGNED
   Assignee|unassigned at sourceware dot org   |nickc at redhat dot com
 Ever confirmed|0   |1
 CC||nickc at redhat dot com

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


[Bug gprofng/29987] bfd/archive.c:1447: undefined reference to `filename_ncmp'

2023-01-11 Thread sch...@linux-m68k.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29987

--- Comment #2 from Andreas Schwab  ---
The problem is -L/usr/local/lib64 that overrides -L/root/binutils/libiberty in
the lookup of -liberty.

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


[Bug binutils/29988] New: AddressSanitizer: heap-buffer-overflow /binutils-gdb/bfd/libbfd.c:784 in bfd_getl64

2023-01-11 Thread 13579and24680 at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29988

Bug ID: 29988
   Summary: AddressSanitizer: heap-buffer-overflow
/binutils-gdb/bfd/libbfd.c:784 in bfd_getl64
   Product: binutils
   Version: 2.40
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: 13579and24680 at gmail dot com
  Target Milestone: ---

Created attachment 14574
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14574=edit
Generated by my fuzzer and afl-tmin

# version

$ ./binutils-gdb_asan/binutils/objdump --version
GNU objdump (GNU Binutils) 2.40.50.20230110
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

-
# git log

$ git log --oneline -1
aefebe82dc8 (HEAD -> master, origin/master, origin/HEAD) IBM zSystems: Fix
offset relative to static TLS

-
# make

$ git clone git://sourceware.org/git/binutils-gdb.git
$ mv binutils-gdb binutils-gdb_asan
$ cd binutils-gdb_asan
$ ./configure CFLAGS='-fsanitize=address -g3' CXXFALGS='-fsanitize=address -g3'
$ make

-
# ASAN report

$ ./binutils-gdb_asan/binutils/objdump -S poc
BFD: warning: poc has a section extending past end of file

poc: file format elf64-x86-64


Disassembly of section abbrev:

3030303030303030 :
BFD: DWARF error: can't find .debug_str section.
BFD: DWARF error: can't find .debug_str section.
BFD: DWARF error: can't find .debug_str section.
BFD: DWARF error: can't find .debug_line_str section.
BFD: DWARF error: can't find .debug_line_str section.
BFD: DWARF error: can't find .debug_line_str section.
BFD: DWARF error: can't find .debug_line_str section.
BFD: DWARF error: can't find .debug_line_str section.
BFD: DWARF error: can't find .debug_line_str section.
BFD: DWARF error: can't find .debug_line_str section.
BFD: DWARF error: can't find .debug_line_str section.
BFD: DWARF error: can't find .debug_line_str section.
BFD: DWARF error: can't find .debug_line_str section.
BFD: DWARF error: mangled line number section (bad file number)
BFD: DWARF error: mangled line number section (bad file number)
=
==3970096==ERROR: AddressSanitizer: heap-buffer-overflow on address
0x6030017f at pc 0x5573ee01c8cc bp 0x7fff9bcf2f50 sp 0x7fff9bcf2f40
READ of size 1 at 0x6030017f thread T0
#0 0x5573ee01c8cb in bfd_getl64
/home/a13579/fuzz_binutils-gdb/binutils-gdbnew/binutils-gdb_asan/bfd/libbfd.c:784
#1 0x5573ee16bef2 in read_indexed_address dwarf2.c:1431
#2 0x5573ee16dc6a in read_attribute_value dwarf2.c:1669
#3 0x5573ee16e004 in read_attribute dwarf2.c:1711
#4 0x5573ee1783c7 in scan_unit_for_symbols dwarf2.c:3973
#5 0x5573ee17c2c4 in comp_unit_maybe_decode_line_info dwarf2.c:4721
#6 0x5573ee17bf03 in comp_unit_find_nearest_line dwarf2.c:4679
#7 0x5573ee182273 in _bfd_dwarf2_find_nearest_line_with_alt dwarf2.c:5991
#8 0x5573ee0d4de3 in _bfd_elf_find_nearest_line_with_alt
/home/a13579/fuzz_binutils-gdb/binutils-gdbnew/binutils-gdb_asan/bfd/elf.c:9338
#9 0x5573ee0d4c72 in _bfd_elf_find_nearest_line
/home/a13579/fuzz_binutils-gdb/binutils-gdbnew/binutils-gdb_asan/bfd/elf.c:9315
#10 0x5573edec9d8b in show_line objdump.c:2180
#11 0x5573edecf759 in disassemble_bytes objdump.c:3339
#12 0x5573eded37f3 in disassemble_section objdump.c:4050
#13 0x5573ee024bbc in bfd_map_over_sections
/home/a13579/fuzz_binutils-gdb/binutils-gdbnew/binutils-gdb_asan/bfd/section.c:1366
#14 0x5573eded4767 in disassemble_data objdump.c:4194
#15 0x5573ededc530 in dump_bfd objdump.c:5676
#16 0x5573ededc807 in display_object_bfd objdump.c:5739
#17 0x5573ededcb38 in display_any_bfd objdump.c:5825
#18 0x5573ededcbb2 in display_file objdump.c:5846
#19 0x5573edede4db in main objdump.c:6254
#20 0x7f755d389082 in __libc_start_main ../csu/libc-start.c:308
#21 0x5573edec23bd in _start
(/home/a13579/fuzz_binutils-gdb/binutils-gdbnew/binutils-gdb_asan/binutils/objdump+0x13b3bd)

0x6030017f is located 2 bytes to the right of 29-byte region
[0x60300160,0x6030017d)
allocated by thread T0 here:
#0 0x7f755d66a808 in __interceptor_malloc
../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144
#1 0x5573ee01b6aa in bfd_malloc
/home/a13579/fuzz_binutils-gdb/binutils-gdbnew/binutils-gdb_asan/bfd/libbfd.c:289
#2 0x5573ee168ad5 in read_section dwarf2.c:734
#3 0x5573ee16bae7 in read_indexed_address dwarf2.c:1412
#4 0x5573ee16dc6a in read_attribute_value dwarf2.c:1669

[Bug gprofng/29987] bfd/archive.c:1447: undefined reference to `filename_ncmp'

2023-01-11 Thread dilyan.palauzov at aegee dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=29987

--- Comment #1 from dilyan.palauzov at aegee dot org  ---
linking ld.bfd also fails, when using ld.bfd 2.39.50.20220817:

 make V=1   
make[1]: Entering directory '/root/binutils/ld'
Making all in po
make[2]: Entering directory '/root/binutils/ld/po'
make[2]: Nothing to be done for 'all'
make[2]: Leaving directory '/root/binutils/ld/po'
make[2]: Entering directory '/root/binutils/ld'
/bin/sh ./libtool  --tag=CC   --mode=link gcc -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Werror
-DELF_LIST_OPTIONS=true -DELF_SHLIB_LIST_OPTIONS=true
-DELF_PLT_UNWIND_LIST_OPTIONS=true  -I/usr/local/include -O2 -pipe -g   -o
ld-new ldgram.o ldlex-wrapper.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o
ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o plugin.o
ldbuildid.o eelf_x86_64.o eelf32_x86_64.o eelf_i386.o eelf_iamcu.o ldelf.o
ldelfgen.o ../bfd/libbfd.la ../libctf/libctf.la ../libiberty/libiberty.a  -lz
-L/usr/local/lib64 -lzstd  
libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow
-Wstack-usage=262144 -Werror -DELF_LIST_OPTIONS=true
-DELF_SHLIB_LIST_OPTIONS=true -DELF_PLT_UNWIND_LIST_OPTIONS=true
-I/usr/local/include -O2 -pipe -g -o ld-new ldgram.o ldlex-wrapper.o lexsup.o
ldlang.o mri.o ldctor.o ldmain.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o
ldfile.o ldcref.o plugin.o ldbuildid.o eelf_x86_64.o eelf32_x86_64.o
eelf_i386.o eelf_iamcu.o ldelf.o ldelfgen.o  ../bfd/.libs/libbfd.a
-L/usr/local/lib64 ../libctf/.libs/libctf.a
-L/root/binutils/libctf/../libiberty /root/binutils/bfd/.libs/libbfd.a
/root/binutils/libsframe/.libs/libsframe.a -liberty ../libiberty/libiberty.a
-lz -lzstd
/usr/local/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../x86_64-pc-linux-gnu/bin/ld:
../libiberty/libiberty.a(concat.o): in function `concat_length':
/git/binutils-gdb/libiberty/concat.c:91: multiple definition of
`concat_length'; /usr/local/lib64/libiberty.a(concat.o):concat.c:(.text+0x0):
first defined here
/usr/local/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../x86_64-pc-linux-gnu/bin/ld:
../libiberty/libiberty.a(concat.o): in function `concat_copy':
/git/binutils-gdb/libiberty/concat.c:106: multiple definition of `concat_copy';
/usr/local/lib64/libiberty.a(concat.o):concat.c:(.text+0xb0): first defined
here
/usr/local/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../x86_64-pc-linux-gnu/bin/ld:
../libiberty/libiberty.a(concat.o): in fu[89/1980]oncat_copy2':
/git/binutils-gdb/libiberty/concat.c:130: multiple definition of
`concat_copy2'; /usr/local/lib64/libiberty.a(concat.o):concat.c:(.text+0x180):
first defined here
/usr/local/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../x86_64-pc-linux-gnu/bin/ld:
../libiberty/libiberty.a(concat.o): in function `concat':
/git/binutils-gdb/libiberty/concat.c:141: multiple definition of `concat';
/usr/local/lib64/libiberty.a(concat.o):concat.c:(.text+0x250): first defined
here
/usr/local/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../x86_64-pc-linux-gnu/bin/ld:
../libiberty/libiberty.a(concat.o): in function `reconcat':
/git/binutils-gdb/libiberty/concat.c:178: multiple definition of `reconcat';
/usr/local/lib64/libiberty.a(concat.o):concat.c:(.text+0x3e0): first defined
here
/usr/local/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../x86_64-pc-linux-gnu/bin/ld:
../libiberty/libiberty.a(filename_cmp.o): in function `filename_cmp':
/git/binutils-gdb/libiberty/filename_cmp.c:57: multiple definition of
`filename_cmp';
/usr/local/lib64/libiberty.a(filename_cmp.o):filename_cmp.c:(.text+0x0): first
defined here
/usr/local/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../x86_64-pc-linux-gnu/bin/ld:
../libiberty/libiberty.a(hashtab.o): in function `htab_size':
/git/binutils-gdb/libiberty/hashtab.c:216: multiple definition of `htab_size';
/usr/local/lib64/libiberty.a(hashtab.o):hashtab.c:(.text+0x2c0): first defined
here
/usr/local/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../x86_64-pc-linux-gnu/bin/ld:
../libiberty/libiberty.a(hashtab.o): in function `htab_elements':
/git/binutils-gdb/libiberty/hashtab.c:226: multiple definition of
`htab_elements';
/usr/local/lib64/libiberty.a(hashtab.o):hashtab.c:(.text+0x2d0): first defined
here
/usr/local/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../x86_64-pc-linux-gnu/bin/ld:
../libiberty/libiberty.a(hashtab.o): in function `htab_create_alloc_ex':
/git/binutils-gdb/libiberty/hashtab.c:297: multiple definition of
`htab_create_alloc_ex';
/usr/local/lib64/libiberty.a(hashtab.o):hashtab.c:(.text+0x420): first defined
here
(and so on)

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


[Bug gprofng/29987] New: bfd/archive.c:1447: undefined reference to `filename_ncmp'

2023-01-11 Thread dilyan.palauzov at aegee dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=29987

Bug ID: 29987
   Summary: bfd/archive.c:1447: undefined reference to
`filename_ncmp'
   Product: binutils
   Version: unspecified
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: gprofng
  Assignee: vladimir.mezentsev at oracle dot com
  Reporter: dilyan.palauzov at aegee dot org
  Target Milestone: ---

With gcc 12.2.1 20230108 I try to compile binutils-gdb
gdb-13-branchpoint-431-gda1f81c128b (this is the output of $ git describe
--always ) by calling

export CONFIG_SITE="a"
export CFLAGS="-O2 -pipe -g"
export CXXFLAGS="-O2 -pipe -g"
/git/binutils-gdb/configure --enable-threads --with-system-zlib
--with-system-readline --with-python=/usr/local/bin/python3
--enable-default-hash-style=gnu --enable-gold --without-guile

make

This fails with

make  all-am
make[5]: Entering directory '/root/binutils/gprofng/src'
/bin/sh ../libtool  --tag=CXX   --mode=link g++ -Wall -pthread -Wno-switch -O2
-pipe -g   -o gp-archive gp-archive.o ArchiveExp.o libgprofng.la  -lz 
libtool: link: g++ -Wall -pthread -Wno-switch -O2 -pipe -g -o gp-archive
gp-archive.o ArchiveExp.o  ./.libs/libgprofng.a -L/usr/local/lib64
-L/root/binutils/libiberty /root/binutils/opcodes/.libs/libopcodes.a
/root/binutils/bfd/.libs/libbfd.a -lzstd
/root/binutils/libsframe/.libs/libsframe.a -liberty -lpthread -ldl
/usr/local/lib/../lib64/libstdc++.so -lm -lz -pthread -Wl,-rpath
-Wl,/usr/local/lib/../lib64 -Wl,-rpath -Wl,/usr/local/lib/../lib64
/usr/local/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../x86_64-pc-linux-gnu/bin/ld:
/root/binutils/bfd/.libs/libbfd.a(archive.o): in function
`adjust_relative_path':
/git/binutils-gdb/bfd/archive.c:1447: undefined reference to `filename_ncmp'
/usr/local/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../x86_64-pc-linux-gnu/bin/ld:
/root/binutils/bfd/.libs/libbfd.a(archive.o): in function
`_bfd_construct_extended_name_table':
/git/binutils-gdb/bfd/archive.c:1643: undefined reference to `filename_ncmp'
/usr/local/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../x86_64-pc-linux-gnu/bin/ld:
/root/binutils/bfd/.libs/libbfd.a(syms.o): in function
`_bfd_stab_section_find_nearest_line':
/git/binutils-gdb/bfd/syms.c:1423: undefined reference to `filename_ncmp'
collect2: error: ld returned 1 exit status
make[5]: *** [Makefile:728: gp-archive] Error 1
make[5]: Leaving directory '/root/binutils/gprofng/src'

Last time I compiled successfully was with 2.39.50.20220817

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


[Bug gas/29940] fails to correctly assemble the JAL instruction on riscv64

2023-01-11 Thread jbeulich at suse dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29940

Jan Beulich  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #8 from Jan Beulich  ---
Fixed on master as well as the branch.

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


[Bug gas/29940] fails to correctly assemble the JAL instruction on riscv64

2023-01-11 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29940

--- Comment #7 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_40-branch branch has been updated by Jan Beulich
:

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

commit ad2021a0f761e23576820aca50a7ac10d7f40bed
Author: Jan Beulich 
Date:   Wed Jan 11 10:31:43 2023 +0100

gas/RISC-V: adjust assembler for opcode table re-ordering

PR gas/29940

With the single-operand JAL entry now sitting ahead of the two-operand
one, the parsing of a two-operand insn would first try to parse an 'a'-
style operand, resulting in the insertion of bogus (and otherwise
unused) undefined symbols in the symbol table, having register names.
Since 'a' is used as 1st operand only with J and JAL, and since JAL is
the only insn _also_ allowing for a register as 1st operand (and then
there being a 2nd one), special case this parsing aspect right there.

Reviewed-by: Palmer Dabbelt 

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


[Bug gas/29940] fails to correctly assemble the JAL instruction on riscv64

2023-01-11 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29940

--- Comment #6 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Jan Beulich :

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

commit f56532cc17868e2c7e765bfd78322157048ff6ec
Author: Jan Beulich 
Date:   Wed Jan 11 10:31:43 2023 +0100

gas/RISC-V: adjust assembler for opcode table re-ordering

PR gas/29940

With the single-operand JAL entry now sitting ahead of the two-operand
one, the parsing of a two-operand insn would first try to parse an 'a'-
style operand, resulting in the insertion of bogus (and otherwise
unused) undefined symbols in the symbol table, having register names.
Since 'a' is used as 1st operand only with J and JAL, and since JAL is
the only insn _also_ allowing for a register as 1st operand (and then
there being a 2nd one), special case this parsing aspect right there.

Reviewed-by: Palmer Dabbelt 

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