This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: [PATCH][GOLD] Handle -Ttext, -Tdata and -Tbss options in scripts.


On Thu, Oct 15, 2009 at 7:43 AM, Ian Lance Taylor <iant@google.com> wrote:
> "Doug Kwan (éæå)" <dougkwan@google.com> writes:
>
>> Â Â This patch adds support of -Ttext, -Tdata and -Tbss options in
>> scripts. ÂBasically, it does a dot assignment at the first section of
>> the appropriate type.
>
>> 2009-10-15 ÂDoug Kwan Â<dougkwan@google.com>
>>
>> Â Â Â Â * script-sections.cc (Script_sections::set_section_addresses):
>> Â Â Â Â Handle -Ttext, -Tdata and -Tbbs options.
>> Â Â Â Â (Script_sections::create_segments): If the -Tbss option is used,
>> Â Â Â Â begin a new segment when seeing a new run of BBS sections.
>
> I don't think we should do this. ÂThe patch is well-written, and there
> is a sense in which it is clearly correct: -Ttext really should set
> the address of the text segment, even when using a linker script.
> However, the purpose of supporting linker scripts in gold is to be
> compatible with the GNU linker, and this is not how the GNU linker
> handles -Ttext, et. al. ÂIn the GNU linker, -Ttext sets the address of
> the .text section, not the text segment, and similarly -Tdata and
> -Tbss set the addresses of the .data and the .bss sections.

There is this option:

  -Ttext-segment ADDRESS      Set address of text segment


-- 
H.J.


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