<< Back to previous view

[PCC-78] add support for __attribute__(__section__) Created: 14/Aug/09  Updated: 18/Apr/10

Status: Closed
Project: pcc
Component/s: C frontend
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Gregory McGarry Assignee: Anders Magnusson
Resolution: Fixed Votes: 0
Environment: Ubuntu 32-bit & 64-bit


 Description   
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.


 Comments   
Comment by Anders Magnusson [ 05/Jan/10 04:30 PM ]
Hm, __attribute__(__section__) was added long time ago, dors it not work?
Comment by Anders Magnusson [ 18/Apr/10 03:58 PM ]
Implemented since long time ago.
Generated at Fri Oct 31 23:58:20 CET 2014 using JIRA Enterprise Edition, Version: 3.13.1-#333.