Well, it looks like I spoke too soon. 

SDCC is still dumping some non-vector stuff in the GSINIT and HOME segments. I 
see how I could use the linker to relocate GSINIT* segments to someplace else 
(or modify the mcs51 library). But I don't see how to relocate 
__sdcc_program_startup from HOME to CSEG. It doesn't seem to be defined 
anywhere in the lib directory that was installed with SDCC.

-----Original Message-----
From: Brandon Fosdick [mailto:bfosd...@movea.com] 
Sent: Thursday, February 11, 2010 11:42 AM
To: sdcc-user@lists.sourceforge.net
Subject: Re: [Sdcc-user] Default linker script for mcs51?

Both options seem to work. Thank you.

For the sake of posterity, the .lnk file can be modified such that the HOME 
segment points to the desired location for the vectors and the CSEG segment 
points to the desired code location.

Passing -Wl-bCSEG=0x1000 to SDCC on the command line also works.

Thanks

-----Original Message-----
From: Maarten Brock [mailto:sourceforge.br...@dse.nl]
Sent: Thursday, February 11, 2010 10:30 AM
To: sdcc-user@lists.sourceforge.net
Subject: Re: [Sdcc-user] Default linker script for mcs51?

Brendan,

SDCC does not accept a linker script, but it creates one (extension .lnk) when 
calling the linker. You can adapt it (or write it yourself) and then call the 
linker manually instead of through SDCC. Use sdcc -V --verbose to see how the 
linker is called.

To relocate only the code and not the vectors, you could use a .asm file with 
the vectors in an ABS area with .org 0x0000. You could also try to use 
-Wl-bCSEG=0x1000 and the like.

Maarten

> That's disappointing. Is there another linker that I could use instead?
>
> I had found that page, but it seems that I can only relocate the 
> entire code segment along with the interrupt vectors. I need to 
> relocate the code, but not the vectors.
>
> Has there been any effort towards creating a new linker? Should I 
> write one?
>
> -----Original Message-----
> From: Jan Waclawek [mailto:w...@efton.sk]
> Sent: Wednesday, February 10, 2010 9:14 PM
> To: sdcc-user@lists.sourceforge.net
> Subject: Re: [Sdcc-user] Default linker script for mcs51?
>
> Well, I am not the most qualified to answer, but SDCC's linker is not 
> scriptable as you might been used to.
>
> For code/data segments [re]location you might want to look at the 
> hints in http://sdcc.sourceforge.net/doc/sdccman.html/node48.html .
>
> Jan Waclawek
>
>
>>I'm working on a bootloader for an 8051-based project (Nordic 
>>nRF24Le1), an= d I need to make linker scripts to put everything in 
>>its proper place. But = I can't seem to find any example linker 
>>scripts, or even the default script= s used by SDCC. Can someone point 
>>me in the  right direction?
>
>
> ----------------------------------------------------------------------
> -------- SOLARIS 10 is the OS for Data Centers - provides features 
> such as DTrace, Predictive Self Healing and Award Winning ZFS. Get 
> Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> Sdcc-user mailing list
> Sdcc-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>
> ----------------------------------------------------------------------
> -------- SOLARIS 10 is the OS for Data Centers - provides features 
> such as DTrace, Predictive Self Healing and Award Winning ZFS. Get 
> Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> Sdcc-user mailing list
> Sdcc-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>
>


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, 
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW 
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, 
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW 
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to