This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -Ttext with -mthumb causes relocation truncated to fit


Shaun Jackman wrote:
I did fix at least one bug, such that -Ttext does something useful with
ELF toolchains, if your linker script it set up to use it.  I think the
ARM BPABI script may be the only one set up that way, though.


That would be excellent. I dislike having to read / modify / write
(read: fork) an existing linker script only to change the org and
stack location. Speaking of which, the addition of a -Tstack flag
would eliminate any need I have for a linker script.

Where can I find the ARM Base Platform ABI linker script you mention?

In the current binutils sources, look at ld/scripttempl/armbpabi.sc. Search for SEGMENT_START, in particular. This is an expression you can use in a linker script that will honor the -T flags. I've been meaning to add that support to the elf.sc linker script (used on GNU/Linux, for example), but I've never gotten around to it.


--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]