This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: ld script to emulparams conversion
Looking further over the weekend, it appears that I just can't use the scripttempl/elf.sc template. So, I'm writing a new scripttempl/myos.sc, and hoping it'll work. In this effort, I may end up writing a new output layer for libbfd, so we'll see what happens.
- Alex
-----Original Message-----
From: Nick Clifton [mailto:nickc@redhat.com]
Sent: Thursday, November 06, 2008 5:53 AM
To: Austin, Alex
Cc: binutils@sourceware.org
Subject: Re: ld script to emulparams conversion
Hi Alex,
> I'm not really sure what to do differently with .rodata, .glue_7t, etc.
> Are emulparams well defined somewhere?
Not really. The code is the documentation. :-)
> .text :
> {
> PROVIDE(A_Custom_Symbol = .);
> *( .text)
> *( .rodata*)
> PROVIDE(Another_Cystom_Symbol = .);
> PROVIDE(Yet_Another_Sym = SIZEOF(.text));
> *(.glue_7t) *(.glue_7)
> _etext = .;
> } > ROM_MAP : appli
This seems OK. The .glue* sections will contain linker generated code
to handle switching between ARM and THUMB modes if the object files are
not marked as supporting this themselves.
Strictly speaking it would be better to put the .rodata into its own
section and arrange for it to mapped into its own segment, since it does
not contain executable code. But this probably does not matter to the
OS you are targeting.
Cheers
Nick