Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Link script problem???   Message List  
Reply | Forward Message #11636 of 15019 |
Re: [gbadev] Re: Link script problem???

> Jeff's linkscript is simply more flexible than SNSys' and Nintendo's
> standard linkscript (which all place the .data section in ROM and don't
copy
> it to RAM)...

Which leads me to say something that I feel doesn't get said on here enough:

"Thank you, Jeff."





Sun Jun 2, 2002 5:16 pm

johnisaheadcase
Online Now Online Now
Send Email Send Email

Forward
Message #11636 of 15019 |
Expand Messages Author Sort by Date

Hi, I have one more question about the linkscript.. or GCC, ld? I don't understand why this is happening. Maybe you can put some light on this. Is there...
Robert J. Gebis
rjgebis
Offline Send Email
May 29, 2002
4:11 pm

I think it will help if you give up an array size. Currently the linker/compiler assumes that it is not 'const' because it doesn't know 'size to reserve in...
Jan-Lieuwe Koopmans
jan-lieuwe@...
Send Email
May 29, 2002
4:56 pm

Hello Jan-Lieuwe, Wednesday, May 29, 2002, 6:36:14 PM, you wrote: JLK> I think it will help if you give up an array size. Currently the JLK> linker/compiler...
groepaz
groepaz2000
Offline Send Email
May 29, 2002
5:40 pm

What do you mean it does not know the size. How come this works with empty arrays of type int? Besides compiler have access to struct definition. I just don't...
rjgebis
Offline Send Email
May 29, 2002
5:41 pm

Looking at it again I found another problem: you say that you implemented those arrays in 'data.h'. There should only be a declaration (i.e.: extern const int...
Jan-Lieuwe Koopmans
jan-lieuwe@...
Send Email
May 29, 2002
5:40 pm

Well all data is exported in data.h no cpp data files. So once again const int Array1[] = {}; const tObj Array2[] = {}; How come Array1 is in 0x8000000 and...
rjgebis
Offline Send Email
May 30, 2002
8:08 am

Maybe the keyword 'const' is the problem? Maybe when it's const it assumes it is a global variable, and globals are in RAM? Just guessing here :-) I use In the...
Martijn Reuvers
martijntwotr...
Offline Send Email
May 29, 2002
6:11 pm

Hi, Jeff's linkscript works differently. SNSys' linkscript (which you are using) places the .data section in ROM (which is incorrect in my point of view......
Jan-Lieuwe Koopmans
jan-lieuwe@...
Send Email
May 29, 2002
6:37 pm

Hi! Ah... that explains alot of why it works with my code :-) The data I use are in fact initialized globals, but I really don't want them to be in RAM at all,...
Martijn Reuvers
martijntwotr...
Offline Send Email
May 29, 2002
7:20 pm

Hello Martijn, Wednesday, May 29, 2002, 9:15:50 PM, you wrote: MR> Hi! MR> Ah... that explains alot of why it works with my code :-) The data I use are MR> in...
groepaz
groepaz2000
Offline Send Email
May 29, 2002
7:51 pm

Hi, Well, I think you would have a problem when implementing this function, for instance: void function (void) { static u32 calls = 0; calls++; printf("I've...
Jan-Lieuwe Koopmans
jan-lieuwe@...
Send Email
May 29, 2002
7:50 pm

Forgot to mention: if I do: const int array[] = { 1,2,3 }; I don't have to specify a size either and it will go into ROM. int array[] = { 1,2,3 }; Will put {...
Jan-Lieuwe Koopmans
jan-lieuwe@...
Send Email
May 29, 2002
7:50 pm

With the latest GCC compiler and using Nintendo's libs global variables work, kind of. The vars do go in to memory but they are always initialised to 0...
Martin Piper
fnagaton
Offline Send Email
May 29, 2002
8:37 pm

if I put the following code in a .c / .cpp file: typedef struct { int a,b; } test; const test t[100] = {}; const int t2[100] = {}; Both arrays end up in ROM...
Jan-Lieuwe Koopmans
jan-lieuwe@...
Send Email
May 30, 2002
1:03 pm

Did you try const test t[] = {}; const int t2[] = {}; You are asking why to have empty arrays. Well the engine is generic. It will pickup whatever you export...
rjgebis
Offline Send Email
May 31, 2002
1:00 am

... copy ... Which leads me to say something that I feel doesn't get said on here enough: "Thank you, Jeff."...
Fatty diZilla
johnisaheadcase
Online Now Send Email
Jun 2, 2002
7:12 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help