[Bug ld/26869] New: ld: assertion fail ../../bfd/elflink.c:14806 on i686-linux-gnu

2020-11-12 Thread mliska at suse dot cz
https://sourceware.org/bugzilla/show_bug.cgi?id=26869

Bug ID: 26869
   Summary: ld: assertion fail ../../bfd/elflink.c:14806 on
i686-linux-gnu
   Product: binutils
   Version: 2.35.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: mliska at suse dot cz
  Target Milestone: ---

I hit the following assert:

void
elf_append_rel (bfd *abfd, asection *s, Elf_Internal_Rela *rel)
{
  const struct elf_backend_data *bed = get_elf_backend_data (abfd);
  bfd_byte *loc = s->contents + (s->reloc_count++ * bed->s->sizeof_rel);
  BFD_ASSERT (loc + bed->s->sizeof_rel <= s->contents + s->size);
  bed->s->swap_reloc_out (abfd, rel, loc);
}

I use tip of 2.35-branch and it happens when I link
../../lib/libQt5WebEngineCore.so.5.12.10 on i686 with LTO enabled.

It's related to .rel.got section and it contains ~2000 reloc_count and it
really writes one after s->reloc_count * bed->s->sizeof_rel.

Any hint on how to debug that?

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


[Bug ld/26869] ld: assertion fail ../../bfd/elflink.c:14806 on i686-linux-gnu

2020-11-12 Thread mliska at suse dot cz
https://sourceware.org/bugzilla/show_bug.cgi?id=26869

--- Comment #1 from Martin Liska  ---
ld.gold links that fine

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


[Bug ld/26869] ld: assertion fail ../../bfd/elflink.c:14806 on i686-linux-gnu

2020-11-12 Thread fab...@ritter-vogt.de
https://sourceware.org/bugzilla/show_bug.cgi?id=26869

Fabian Vogt  changed:

   What|Removed |Added

 CC||fab...@ritter-vogt.de

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


[Bug ld/26869] ld: assertion fail ../../bfd/elflink.c:14806 on i686-linux-gnu

2020-11-12 Thread mliska at suse dot cz
https://sourceware.org/bugzilla/show_bug.cgi?id=26869

--- Comment #2 from Martin Liska  ---
I'm reducing list of object files needed:

$ g++ -flto=160 @files.txt -shared -o libQt5WebEngineCore.so.5.12.10
/usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld:
/home/abuild/rpmbuild/BUILD/qtwebengine-everywhere-src-5.12.10/src/core/release/obj/ui/base/base/os_exchange_data.o:
in function `ui::OSExchangeData::OSExchangeData()':
/home/abuild/rpmbuild/BUILD/qtwebengine-everywhere-src-5.12.10/src/core/release/../../3rdparty/chromium/ui/base/dragdrop/os_exchange_data.cc:24:
undefined reference to `ui::OSExchangeDataProviderFactory::CreateProvider()'
/usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: BFD (GNU
Binutils; home:marxin:branches:home:Vogtinator:qt5.12 / openSUSE_Tumbleweed)
2.35.1.20201112-399 assertion fail ../../bfd/elflink.c:14806
collect2: error: ld returned 1 exit status

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


[Bug ld/26869] ld: assertion fail ../../bfd/elflink.c:14806 on i686-linux-gnu since 382aae06322799a25ea52fe61b243cbca4db8d66

2020-11-12 Thread mliska at suse dot cz
https://sourceware.org/bugzilla/show_bug.cgi?id=26869

Martin Liska  changed:

   What|Removed |Added

Summary|ld: assertion fail  |ld: assertion fail
   |../../bfd/elflink.c:14806   |../../bfd/elflink.c:14806
   |on i686-linux-gnu   |on i686-linux-gnu since
   ||382aae06322799a25ea52fe61b2
   ||43cbca4db8d66
 CC||hjl.tools at gmail dot com

--- Comment #3 from Martin Liska  ---
I have a nice reproducer:

$ cat ~/Programming/testcases/metrics.ii
void ReadElfBuildId(void *);
extern char __ehdr_start;
void ParseSmapsHeader() { ReadElfBuildId(&__ehdr_start); }

$ g++ ~/Programming/testcases/metrics.ii -fPIC -shared -O -m32 -o
/tmp/metrics.o -c
$ ./ld/ld-new /tmp/metrics.o -shared -melf_i386
./ld/ld-new: BFD (GNU Binutils) 2.34.50.20200401 assertion fail
../../bfd/elflink.c:14687
Segmentation fault (core dumped)

For completeness there's .s file:

$ cat metrics.s 
.file   "metrics.ii"
.text
.globl  _Z16ParseSmapsHeaderv
.type   _Z16ParseSmapsHeaderv, @function
_Z16ParseSmapsHeaderv:
.LFB0:
.cfi_startproc
pushl   %ebx
.cfi_def_cfa_offset 8
.cfi_offset 3, -8
subl$20, %esp
.cfi_def_cfa_offset 28
call__x86.get_pc_thunk.bx
addl$_GLOBAL_OFFSET_TABLE_, %ebx
pushl   __ehdr_start@GOT(%ebx)
.cfi_def_cfa_offset 32
call_Z14ReadElfBuildIdPv@PLT
addl$24, %esp
.cfi_def_cfa_offset 8
popl%ebx
.cfi_restore 3
.cfi_def_cfa_offset 4
ret
.cfi_endproc
.LFE0:
.size   _Z16ParseSmapsHeaderv, .-_Z16ParseSmapsHeaderv
.section   
.text.__x86.get_pc_thunk.bx,"axG",@progbits,__x86.get_pc_thunk.bx,comdat
.globl  __x86.get_pc_thunk.bx
.hidden __x86.get_pc_thunk.bx
.type   __x86.get_pc_thunk.bx, @function
__x86.get_pc_thunk.bx:
.LFB1:
.cfi_startproc
movl(%esp), %ebx
ret
.cfi_endproc
.LFE1:
.ident  "GCC: (SUSE Linux) 10.2.1 20201028 [revision
a78cd759754c92cecbf235ac9b447dcdff6c6e2f]"
.section.note.GNU-stack,"",@progbits

Started with H.J.'s revision 382aae06322799a25ea52fe61b243cbca4db8d66.

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


[Bug gas/26850] as -g: remove non-executable sections' contribution from DW_AT_ranges

2020-11-12 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26850

--- 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=bcb78b47614ed252226da1a688558a17d8a99ce8

commit bcb78b47614ed252226da1a688558a17d8a99ce8
Author: Nick Clifton 
Date:   Thu Nov 12 11:43:20 2020 +

Stop Gas from generating line info or address ranges for sections that do
not contain code or are not loaded.

PR 26850
* dwarf2dbg.c (dwarf2_gen_line_info_1): Do not record lines in
sections that are not executable or not loadable.
(out_debug_line): Move warning message into dwarf2_gen_line_info_1.
* testsuite/gas/elf/dwarf2-20.s: New test.
* testsuite/gas/elf/dwarf2-20.d: New test driver.
* testsuite/gas/elf/elf.exp: Run the new test.
* testsuite/gas/elf/warn-2.s: Use the .nop directive.

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


[Bug gas/26850] as -g: remove non-executable sections' contribution from DW_AT_ranges

2020-11-12 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26850

Nick Clifton  changed:

   What|Removed |Added

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

--- Comment #2 from Nick Clifton  ---
Hi Fangrui,

  Agreed.  I have applied a patch to implement this suggestion.  I also
  extended it to cover sections that are not loaded as well, since I do
  not see how debug information for them would be useful either.

Cheers
  Nick

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


[Bug ld/26869] ld: assertion fail ../../bfd/elflink.c:14806 on i686-linux-gnu since 382aae06322799a25ea52fe61b243cbca4db8d66

2020-11-12 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26869

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2020-11-12
 Ever confirmed|0   |1
   Target Milestone|--- |2.36

--- Comment #4 from H.J. Lu  ---
linker.c has

.{* Return TRUE if the symbol described by a linker hash entry H
.   is going to be absolute.  Linker-script defined symbols can be
.   converted from absolute to section-relative ones late in the
.   link.  Use this macro to correctly determine whether the symbol
.   will actually end up absolute in output.  *}
.#define bfd_is_abs_symbol(H) \
.  (((H)->type == bfd_link_hash_defined \
.|| (H)->type == bfd_link_hash_defweak) \
.   && bfd_is_abs_section ((H)->u.def.section) \
.   && !(H)->rel_from_abs)
.

elfxx-x86.h has

/* Return TRUE if the symbol described by a linker hash entry H is
   going to be absolute.  Similar to bfd_is_abs_symbol, but excluding
   all linker-script defined symbols.  */
#define ABS_SYMBOL_P(H) \
  (bfd_is_abs_symbol (&(H)->root) && !(H)->root.ldscript_def)

But ldscript_def is set for __ehdr_start which is defined by linker
and isn't a absolute symbol.

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


[Bug ld/26869] ld: assertion fail ../../bfd/elflink.c:14806 on i686-linux-gnu since 382aae06322799a25ea52fe61b243cbca4db8d66

2020-11-12 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26869

--- Comment #5 from H.J. Lu  ---
A patch is posted at

https://sourceware.org/pipermail/binutils/2020-November/114107.html

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


[Bug gas/26858] [arm] unsupported vmul instruction for vfp5-sp-d16 + armv8-r

2020-11-12 Thread avieira at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26858

Andre Vieira  changed:

   What|Removed |Added

 CC||avieira at gcc dot gnu.org
   Last reconfirmed||2020-11-12
 Ever confirmed|0   |1
   Assignee|unassigned at sourceware dot org   |avieira at gcc dot 
gnu.org
 Status|UNCONFIRMED |NEW

--- Comment #2 from Andre Vieira  ---
Confirmed this, typo in the ARM_VARIANT minimum requirement used the double
precision feature bit instead of the single precision one.

Testing a patch.

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


Issue 24906 in oss-fuzz: binutils:fuzz_readelf: Abrt with empty stacktrace

2020-11-12 Thread sheriffbot via monorail
Updates:
Labels: -restrict-view-commit -deadline-approaching

Comment #4 on issue 24906 by sheriffbot: binutils:fuzz_readelf: Abrt with empty 
stacktrace
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24906#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.