overlapping ELF symbols and disassembly output
Mike Frysinger
vapier@gentoo.org
Sun Oct 28 13:58:00 GMT 2007
it is valid in ELF to have overlapping ELF symbols right ? so if i have a
symbol "foo" which starts at say 0x10 and has a size of 0x100, i can have
another symbol "moo" which starts at say 0x20 and has a size of 0x10 ?
what i'm trying to do is embed some data into a function and have objdump do
the right thing ... so for example:
.type foo,%function
foo:
R0 = 0;
... some more assembly ...
.type moo,%object
moo:
.asciz "a data string";
.size moo, . - moo
... some more assembly ...
.size foo, . - foo
objdump on this shows proper disassembly from the start of "foo" up to the
start of "moo", and then shows that the "moo" symbol is data, but after the
end of "moo" to the end of "foo", the information is continued to be
interpreted as data rather than disassembled as object code. i imagine this
is not normal, but can it be expected to work ? :)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
URL: <https://sourceware.org/pipermail/binutils/attachments/20071028/bba9802b/attachment.sig>
More information about the Binutils
mailing list