is there a way to find the maximum alignment supported by the linker?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hej, all.

GCC supports an attribute "alignment".

The docs state the extent to which alignment can be modified depends
on the linker, and it can be very small.

In my code, I have two options; I can either align by double word
length (i.e. 8 or 16 bytes, depending on target) or I can align by the
size required for "atomic isolation", which is to say on Intel
cache-line length, which is up to and including 128 bytes, and on
arm/aarch64 up to and including 2048 bytes, which is the maximum
exclusive reservation granule size.

The docs state if you ask for too much alignment, the linker will fall
back to doing only the most it can do, which isn't very satisfactory,
since you have no idea if it's happening or what that value is.

Is there a way to find out the maximum alignment supported by the iinker?



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux