This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

arm-elf-ld: undefined reference to 'xxx'


Hi everyone,

I met an error when I'd like to execute arm-elf-ld.

[condition]
	1. main() is in main.o
	2. func1() is in obj1.o
	3. func2() is in obj2.o
	4. main() refer to func2()
	5. func2() refer to func1()

The following command occurs an error(undefined reference to `func1').
arm-elf-ld ... -o test.elf main.o obj1.o obj2.o

But if I exchange the place of obj1.o with obj2.o, then the command is
successful without any error.

I want to solve without exchanging objs. (Bcs, I have too many objs.)
If arm-elf-ld has an option related to this problem, it will be possible.

Is there the way to solve it?

--
Prez Ahn (prezahn at gmail dot com)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]