This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I am trying to link object files and libraries to generate new object file
But when I try to link an object file which uses external function with the library contains the function code with '-r' option, the library function code will not be included in the output object file.
For example, I have a C source file named 'foo.c' in which there is a function 'A' invokes a library function 'B'. Then I use the command below to generate object file contain the code of function B:
gcc -o foo.o foo.c ld -r -o newobj.o foo.o -lmylib
Cheers Nick
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |