[Bug gas/26395] binutils 2.28 Assertion failure in md_apply_fix at ../../gas/config/tc-aarch64.c:7766.

2020-09-07 Thread tnfchris at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=26395

--- Comment #6 from Tamar Christina  ---
Hmm an assert should never be hit though. It mean something didn't handle the
error correctly.

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


[Bug gas/26395] binutils 2.28 Assertion failure in md_apply_fix at ../../gas/config/tc-aarch64.c:7766.

2020-09-07 Thread acoplan at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26395

Alex Coplan  changed:

   What|Removed |Added

Version|2.28|2.36 (HEAD)
 Resolution|OBSOLETE|---
   Last reconfirmed||2020-09-07
 Ever confirmed|0   |1
 Status|RESOLVED|REOPENED
 CC||acoplan at gcc dot gnu.org

--- Comment #7 from Alex Coplan  ---
Reproduced on trunk. The attached assembly can be reduced to the following
single instruction which causes an assertion failure:

$ echo "add x3,x3,:lo12:4" | aarch64-none-elf-as

{standard input}: Assembler messages:
{standard input}: Internal error in md_apply_fix at
gas/config/tc-aarch64.c:8248.
Please report this bug.

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


[Bug binutils/26578] New: A memory leak in parse_gnu_debugaltlink

2020-09-07 Thread 15664243668 at 163 dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26578

Bug ID: 26578
   Summary: A memory leak in parse_gnu_debugaltlink
   Product: binutils
   Version: 2.35
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: 15664243668 at 163 dot com
  Target Milestone: ---

Created attachment 12817
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12817&action=edit
PoC

I have found a memory leak in bfd_getl_signed_32(bfd/libbfd.c:669) by fuzzing.
The bug is triggered by
$readelf -agteSdcWw --dyn-syms -D PoC
And the PoC file is in the attachment. I compile Binuitls 2.35 with
AddressSanitizer into x86-64 version on Ubuntu 16.04 and print the debug
information as:

readelf: Error: File
./Output/binutils-2.35/objdump/3/queue/id:016146,src:016137,op:havoc,rep:32 is
not an archive so its index cannot be displayed.
readelf: Warning: The e_shentsize field in the ELF header is larger than the
size of an ELF section header
readelf: Warning: Section 0 has an out of range sh_link value of 27648
readelf: Warning: Section 0 has an out of range sh_info value of 131072
readelf: Warning: [ 0]: Expected link to another section in info fieldreadelf:
Warning: section 0: sh_link value of 27648 is larger than the number of
sections
readelf: Warning: [ 1]: Unexpected value (16777088) in info field.
readelf: Warning: [ 2]: Unexpected value (2147483392) in info field.
readelf: Warning: Size of section 3 is larger than the entire file!
readelf: Warning: [ 4]: Expected link to another section in info fieldreadelf:
Warning: Size of section 6 is larger than the entire file!
readelf: Warning: could not find separate debug file 'ELF'
readelf: Warning: tried: /lib/debug/ELF
readelf: Warning: tried: /usr/lib/debug/usr/ELF
readelf: Warning: tried:
/usr/lib/debug//home/ubuntu/yuetai/Output/binutils-2.35/objdump/3/queue//ELF
readelf: Warning: tried: /usr/lib/debug/ELF
readelf: Warning: tried:
/home/ubuntu/yuetai/Output/binutils-2.35/objdump/3/queue/.debug/ELF
readelf: Warning: tried:
/home/ubuntu/yuetai/Output/binutils-2.35/objdump/3/queue/ELF
readelf: Warning: tried: .debug/ELF
readelf: Warning: tried: ELF
readelf: Warning: could not find separate debug file 'ELF'
readelf: Warning: tried: /lib/debug/ELF
readelf: Warning: tried: /usr/lib/debug/usr/ELF
readelf: Warning: tried:
/usr/lib/debug//home/ubuntu/yuetai/Output/binutils-2.35/objdump/3/queue//ELF
readelf: Warning: tried: /usr/lib/debug/ELF
readelf: Warning: tried:
/home/ubuntu/yuetai/Output/binutils-2.35/objdump/3/queue/.debug/ELF
readelf: Warning: tried:
/home/ubuntu/yuetai/Output/binutils-2.35/objdump/3/queue/ELF
readelf: Warning: tried: .debug/ELF
readelf: Warning: tried: ELF

=
==22576==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x7ff84c0cb79a in __interceptor_calloc
(/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9879a)
#1 0x4cd52a in parse_gnu_debugaltlink ../../binutils/dwarf.c:10305

SUMMARY: AddressSanitizer: 16 byte(s) leaked in 1 allocation(s).

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


[Bug ld/26547] erroneous address relocation using Microsoft COFF .OBJ linked to .ELF x86_64

2020-09-07 Thread minnowware at hotmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26547

Kilian Kegel  changed:

   What|Removed |Added

  Attachment #12808|0   |1
is obsolete||

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


[Bug ld/26547] erroneous address relocation using Microsoft COFF .OBJ linked to .ELF x86_64

2020-09-07 Thread minnowware at hotmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26547

--- Comment #1 from Kilian Kegel  ---
Please find comprehensive explanation at the URL.
The image is not very meaningful...

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


[Bug ld/26547] erroneous address relocation using Microsoft COFF .OBJ linked to .ELF x86_64

2020-09-07 Thread minnowware at hotmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26547

--- Comment #2 from Kilian Kegel  ---
Please find comprehensive explanation at the URL.
The attached image is not very meaningful...

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


[Bug ld/26547] erroneous address relocation using Microsoft COFF .OBJ linked to .ELF x86_64

2020-09-07 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26547

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com
 Ever confirmed|0   |1
   Last reconfirmed||2020-09-07
 Status|UNCONFIRMED |WAITING

--- Comment #3 from H.J. Lu  ---
There could be many issues.  Please create a separate bug for each specific
issue with a small testcase.

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


[Bug binutils/26520] "objdump: DWARF error: could not find variable specification at offset ..." when generating assembly listing of .elf file containing symbols from libstdc++.a

2020-09-07 Thread freddie_chopin at op dot pl
https://sourceware.org/bugzilla/show_bug.cgi?id=26520

--- Comment #8 from Freddie Chopin  ---
The issue is fixed for me too - thanks!

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


[Bug ld/26580] New: Size and alignment from as-needed shared library bss symbols affect commons

2020-09-07 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26580

Bug ID: 26580
   Summary: Size and alignment from as-needed shared library bss
symbols affect commons
   Product: binutils
   Version: 2.36 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: amodra at gmail dot com
  Target Milestone: ---

An as-needed shared library that isn't needed can affect common symbol size and
alignment.

cat > a.c <<\EOF
#include 

extern void __attribute__ ((weak)) foo (void);

char x, y, z;

long
lowest_align (void *a, void *b, void *c)
{
  unsigned long bits = (long) a | (long) b | (long) c;
  return bits & -bits;
}

int
main (void)
{
  printf ("library %sloaded\n", &foo ? "" : "not ");
  printf ("alignment %ld\n", lowest_align (&x, &y, &z));
  return 0;
}
EOF
cat > b.c <<\EOF
long long x, y, z;

void foo (void) {}
EOF
gcc -O2 -fpic -fcommon -shared -o libb.so b.c
gcc -O2 -fpic -fcommon -o y1 a.c -Wl,--no-as-needed,-R,. libb.so
./y1
library loaded
alignment 8
gcc -O2 -fpic -fcommon -o y2 a.c -Wl,--as-needed,-R,. libb.so
./y2
library not loaded
alignment 8
gcc -O2 -fpic -fcommon -o y3 a.c
./y3
library not loaded
alignment 1

I reckon y2 and y3 should print the same result.

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


[Bug ld/26580] Size and alignment from as-needed shared library bss symbols affect commons

2020-09-07 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26580

Alan Modra  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com

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