IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> [PATCH] Lejos OSEK 1.07 to 1.09: don't discard init.o
AlexN
post 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)
Attached File  keep_init_o.patch.txt ( 1.91k ) Number of downloads: 6
 
Go to the top of the page
 
+Quote Post
takashic
post Mar 12 2008, 06:22 PM
Post #2


Advanced Member
***

Group: Members
Posts: 136
Joined: 7-October 07
Member No.: 4,012



QUOTE(AlexN @ Mar 12 2008, 11:12 PM) *
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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

 



Lo-Fi Version Time is now: 1st August 2010 - 04:34 AM