Issue Details (XML | Word | Printable)

Key: PCC-323
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Iain Hibbert
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
pcc

float/double constant values placed in wrong section with -fPIC

Created: 19/Apr/11 11:26 AM   Updated: 19/Apr/11 10:06 PM
Component/s: i386 target
Affects Version/s: None
Fix Version/s: None

Environment: NetBSD/i386


 Description  « Hide
The following code extract

float foo(void) // or double
{
        return 0;
}

when compiled using "-fPIC -shared -Wl,--warn-shared-textrel" flags results in an error

  ld: warning: creating a DT_TEXTREL in a shared object.

as the const value is stored in the .rodata section and accessed directly, but I
think it should be a .rel section and accessed appropriately

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 19/Apr/11 10:05 PM
Fixed now. Just an oversight.

Anders Magnusson added a comment - 19/Apr/11 10:06 PM
It was stored in correct section, but reference should be relative.