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

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

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 added a comment - 05/Jan/10 04:30 PM
Hm, __attribute__(__section__) was added long time ago, dors it not work?

Anders Magnusson added a comment - 18/Apr/10 03:58 PM
Implemented since long time ago.