![]() ![]() |
Mar 12 2008, 09:12 AM
Post
#1
|
|
|
Newbie ![]() Group: Members Posts: 7 Joined: 6-March 08 Member No.: 4,871 |
Hi,
I found the reason for my linking problem under Linux, init.o was discarded/ignored starting with version 1.07. This caused that main() wasn't called and so nothing at all was called so everything was discarded, The linker script changed like this from 1.06 to 1.07: - init.o (*.text *.text.*) + */init.o (*.text *.text.*) since init.o was now in some subdirectory. But apparently using */init.o also means something like "don't complain if you can't find the file", I could branch to whatever non-existing functions I like, I never got unresolved symbols, i.e. the file was ignored completely. I fixed this by using the full path to the init.o (sed is required for that) and by putting it inside a KEEP() instruction. The attached patch is against 1.09 and makes it work under Linux again, please apply. Alex
Attached File(s)
|
|
|
|
Mar 12 2008, 06:22 PM
Post
#2
|
|
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 136 Joined: 7-October 07 Member No.: 4,012 |
Hi, I found the reason for my linking problem under Linux, init.o was discarded/ignored starting with version 1.07. This caused that main() wasn't called and so nothing at all was called so everything was discarded, The linker script changed like this from 1.06 to 1.07: - init.o (*.text *.text.*) + */init.o (*.text *.text.*) since init.o was now in some subdirectory. But apparently using */init.o also means something like "don't complain if you can't find the file", I could branch to whatever non-existing functions I like, I never got unresolved symbols, i.e. the file was ignored completely. I fixed this by using the full path to the init.o (sed is required for that) and by putting it inside a KEEP() instruction. The attached patch is against 1.09 and makes it work under Linux again, please apply. Alex Hi Alex, Thank you very much! I will apply your patch to the next release and add some description for Linux users. Takashi |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 1st August 2010 - 04:34 AM |