GNU LD linker option Issue statically linking standard libs
Posted: Thu Jan 24, 2013 5:05 pm
Hi
I am trying to link some standard libraries using "ld" toolchain and facing issue while including the standard libraries.
I know using "gcc" is the better option as it always include standard libraries but i have same symbols reused so i can not use "gcc" option for linking.
Please let me know how i can link using "ld" and provide standard library such as libgcc or libc ?
For reference following is the command i am trying - Here my assumption is -lc command can link the libc library but i don't see it happens and i am still getting undefined reference to library function names.
compiler tool chain/ld -T {linkerscript} -lc a.o b.o -o final.bin
Has any one tried before statically linking standard library using ld ?
Thanks,
- ja
I am trying to link some standard libraries using "ld" toolchain and facing issue while including the standard libraries.
I know using "gcc" is the better option as it always include standard libraries but i have same symbols reused so i can not use "gcc" option for linking.
Please let me know how i can link using "ld" and provide standard library such as libgcc or libc ?
For reference following is the command i am trying - Here my assumption is -lc command can link the libc library but i don't see it happens and i am still getting undefined reference to library function names.
compiler tool chain/ld -T {linkerscript} -lc a.o b.o -o final.bin
Has any one tried before statically linking standard library using ld ?
Thanks,
- ja