Issue Details (XML | Word | Printable)

Key: PCC-78
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Gregory McGarry
Votes: 0
Watchers: 0
Operations

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

add support for __attribute__(__section__)

Created: 14/Aug/09 08:44 AM   Updated: 18/Apr/10 03:58 PM
Component/s: C frontend
Affects Version/s: None
Fix Version/s: None

Environment: Ubuntu 32-bit & 64-bit


 Description  « Hide
I want to share crtbegin.c between the 32-bit and 64-bit builds.

Originally on i386, I used inline assembler with .long directives to store addresses in the jump table. However, this failed on amd64, since addresses are .quad, not .long.

Rather than having different inline assembler for 32-bit and 64-bit, a simple solution is to use __attribute__((__section__())) extension to force the addresses to appear in the desired section.


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson made changes - 05/Jan/10 04:29 PM
Field Original Value New Value
Assignee Anders Magnusson [ ragge ]
Anders Magnusson made changes - 18/Apr/10 03:58 PM
Status Open [ 1 ] Closed [ 6 ]
Resolution Fixed [ 1 ]