Adding LONG(0) as below to a ld script, causes the section to contain data while still retaining the type NOBITS and with __bss_start still point to its beginning (instead of regarding it as a PROGBITS and having _bss_start point above it). 180c180 < .plt : { *(.plt) } :hdata --- > .plt : { LONG(0) *(.plt) } :hdata
Created attachment 1125 [details] executable with NOBITS .plt containing data an excerpt from readelf --wide -S cmctest: [34] .plt NOBITS 00000000a2000350 010350 000050 18 WA 0 0 8 [35] .bss NOBITS 00000000a20003a0 0103a0 000008 00 WA 0 0 1 While .plt is typed NOBITS, we see that it contains data by the fact that its offset is same as the following section, .bss
Hi Yaakov, Please could you provide a way to reproduce this problem, so that I can test it ? Also, please can you check to see if the problem still exists with version 2.17 of the binutils (the latest release) ? Cheers Nick
People who can help you in reproducing the bug are Chij-Mehn Chang <cmchang@us.ibm.com> Nishanth Aravamudan <nacc@us.ibm.com> I could not add them to the CC list. May be you could Yaakov
http://sourceware.org/ml/binutils-cvs/2007-09/msg00030.html http://sourceware.org/ml/binutils-cvs/2007-09/msg00031.html
Subject: Re: Emitting code to a NOBITS section is not handled properly "amodra at bigpond dot net dot au" <sourceware-bugzilla@sourceware.org> wrote on 08/09/2007 14:06:15: > > ------- Additional Comments From amodra at bigpond dot net dot au > 2007-09-08 11:06 ------- > http://sourceware.org/ml/binutils-cvs/2007-09/msg00030.html > http://sourceware.org/ml/binutils-cvs/2007-09/msg00031.html > > -- > What |Removed |Added > ---------------------------------------------------------------------------- > Status|WAITING |RESOLVED > Resolution| |FIXED > > > http://sourceware.org/bugzilla/show_bug.cgi?id=2864 > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. Thanks for the update, --- Yaakov Yaari Code Optimization Technologies IBM Haifa Research Lab