[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: luajit-FFI suggestions
- From: Mike Pall <mikelu-1106@...>
- Date: Tue, 14 Jun 2011 23:14:40 +0200
Scott Shumaker wrote:
> -Wl,-E doesn't seem to prevent the linker from stripping them out as
> unused functions, I'm afraid.
Sorry, but that's not what I get:
$ cat >test1.c <<END
int unused(void) { return 42; }
int main(int argc, char **argv) { return 0; }
END
$ cc -O2 -s -Wl,-E -o test1 test1.c
$ nm -D test1 | grep unused
0000000000400730 T unused
$ objdump -d test1 | grep '40073[0-5]'
0000000000400730 <unused>:
400730: b8 2a 00 00 00 mov $0x2a,%eax
400735: c3 retq
--Mike