Alignment of .rodata symbols wasting space
John Carter
john.carter@tait.co.nz
Fri May 13 03:28:00 GMT 2005
On Fri, 13 May 2005, John Carter wrote:
> As far as I can see, there are two sources for this discrepancy...
> 1) Alignment. (1 byte symbol followed by a 4 byte aligned symbol)
> 2) Some large mysterious other thing between the last symbol and the end
> of the rodata segment..
>
> Question 1)
> Any ld flags / linking script options / ... that I can use to pack all
> byte aligned objects together?
I hate answering my own questions... but I finally found in the change log
for the absolutely latest and greatest version of binutils (2.16)
http://sourceware.org/cgi-bin/cvsweb.cgi/~checkout~/src/ld/NEWS?rev=1.58&content-type=text/plain&cvsroot=src&only_with_tag=binutils-2_16
Added SORT_BY_NAME and SORT_BY_ALIGNMENT to the linker script
language to permit sorting sections by section name or section
maximum alignment.
I am still looking for an answer to this one though...
> Question 2)
> Any guesses as to what are the mystery rodata items that are not showing
> up in objdump --syms?
John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : john.carter@tait.co.nz
New Zealand
We all live but seconds away from pain and death, yet we live as
though it wasn't even possible.
We are but one person amongst 6 billion, yet we live as though we,
personally, matter.
So, as you were saying... how real did you want me to get?
More information about the Gcc-help
mailing list