Bug 2864 - Emitting code to a NOBITS section is not handled properly
Summary: Emitting code to a NOBITS section is not handled properly
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.15
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-29 08:06 UTC by Yaakov Yaari
Modified: 2007-09-08 11:06 UTC (History)
1 user (show)

See Also:
Host: powerpc64-linux
Target: powerpc64-linux
Build:
Last reconfirmed:


Attachments
executable with NOBITS .plt containing data (3.30 KB, application/ELFppc64 executable)
2006-06-29 08:17 UTC, Yaakov Yaari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yaakov Yaari 2006-06-29 08:06:24 UTC
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
Comment 1 Yaakov Yaari 2006-06-29 08:17:41 UTC
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
Comment 2 Nick Clifton 2006-08-08 10:00:20 UTC
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
Comment 3 Yaakov Yaari 2006-08-08 14:07:53 UTC
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
Comment 5 Yaakov Yaari 2007-09-09 06:09:10 UTC
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