assigning symbol size via linker script

Mike Frysinger vapier@gentoo.org
Thu Dec 21 00:07:00 GMT 2006


this is a pretty basic question i imagine, but i cant seem to find the answer 
in the binutils ld docs:
http://sourceware.org/binutils/docs-2.17/ld/index.html

i'd like to use a linker script to create a symbol and set the size of it ... 
so the pseudo linker script being like:
.text : {
	...
	my_label = .;
	custom.o (.text)
	my_label.size = . - my_label;
	...
}

currently i'm doing:
	my_label_start = .;
	custom.o (.text)
	my_label_end = .;
and then looking up both symbols and doing a diff on their addresses to find 
the size of the section in between
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20061221/7f6b0752/attachment.sig>


More information about the Binutils mailing list