New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 801100 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug

Blocking:
issue 607968



Sign in to add a comment

Readelf warnings on shared libraries produced by lld

Project Member Reported by tsniatow...@vewd.com, Jan 11 2018

Issue description

Chrome Version: master@Jan11 (e9161bf9c29a7cb7ddb5fb136ca7dc4f0c37f939)
OS: Linux

On recent Chromium trying to readelf lld-produced shared libraries produces
"Info field should index a relocatable section" warnings (for each shared
library as far as I can tell, libbase is a conveniently not-huge example):

$ gn gen out
$ ninja -C out libbase.so
$ ./third_party/binutils/Linux_x64/Release/bin/readelf -S out/libbase.so
There are 41 section headers, starting at offset 0x16567a0:

Section Headers:
  [Nr] Name              Type             Address           Offset
       Size              EntSize          Flags  Link  Info  Align
(snip...)
  [ 8] .rela.dyn         RELA             0000000000097740  00097740
       000000000000c048  0000000000000018   A       3     0     8
readelf: Warning: [ 9]: Info field (0) should index a relocatable section.
  [ 9] .rela.plt         RELA             00000000000a3788  000a3788
       000000000000e790  0000000000000018   A       3     0     8
(snip...)
$ ./third_party/binutils/Linux_x64/Release/bin/readelf -version
GNU readelf (GNU Binutils) 2.29.1

The issue does not reproduce if use_lld is false. Readelf 2.28.1 also reports the
warning, older readelf (2.26.1) does not. If the shared library is stripped, the
warning is no longer produced (and info for .rela.plt seems to point to .got.plt):
$ strip out/libbase.so
$ ./third_party/binutils/Linux_x64/Release/bin/readelf -S out/libbase.so
There are 31 section headers, starting at offset 0x4e7ee0:

Section Headers:
  [Nr] Name              Type             Address           Offset
       Size              EntSize          Flags  Link  Info  Align
(snip...)
  [ 8] .rela.dyn         RELA             0000000000093e18  00093e18
       000000000000bfb8  0000000000000018   A       3     0     8
  [ 9] .rela.plt         RELA             000000000009fdd0  0009fdd0
       000000000000e6e8  0000000000000018  AI       3    27     8
(snip...)
  [27] .got.plt          PROGBITS         00000000004e3048  004e3048
       0000000000004d10  0000000000000000  WA       0     0     8
(snip...)


 

Comment 1 by thakis@chromium.org, Jan 18 2018

Blocking: 607968

Comment 2 by p...@chromium.org, Jan 18 2018

Status: WontFix (was: Untriaged)
The readelf warning was wrong and has been disabled for executables and DSOs in binutils trunk.
https://sourceware.org/ml/binutils/2017-12/msg00160.html
Bah! Thanks for the link.

Sign in to add a comment