linux-mips
[Top] [All Lists]

Re: BFD: Warning: Writing section `.text' to huge (ie negative) file off

To: "Nigel Stephens" <nigel@mips.com>
Subject: Re: BFD: Warning: Writing section `.text' to huge (ie negative) file offset 0xa1ffff10
From: zhuzhenhua <zzh.hust@gmail.com>
Date: Sat, 3 Jun 2006 12:36:32 +0800
Cc: "Thiemo Seufer" <ths@networkno.de>, linux-mips <linux-mips@linux-mips.org>
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=KqsGIpi41MpzYj3AdRimPCbCrNKsad5PliPVd33BR4FuFuCrVMNBCzMUoQqKWv419BQdlHkWPO/WtxjmOOaDYT7yO5QmitsXWumtxb0j+933S72QSBUb1KmjKhveikQZGr0L85GdY9x1cZ0lEoemPVixDbB7L0ZKr3SC53ty5gY=
In-reply-to: <44801CFF.1010400@mips.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <50c9a2250605312319v7480f2el36d9c0a052c85d5f@mail.gmail.com> <20060601092413.GL1717@networkno.de> <50c9a2250606010356s63f6d6e7j255c77660d6f472a@mail.gmail.com> <447EE274.7060207@mips.com> <50c9a2250606011749r7f89fbben2c61edd43c7ec0a6@mail.gmail.com> <44801A59.5080508@mips.com> <44801CFF.1010400@mips.com>
Sender: linux-mips-bounce@linux-mips.org
On 6/2/06, Nigel Stephens <nigel@mips.com> wrote:


Nigel Stephens wrote:
>
>>
>>  8 .rodata       00000190  000000f0  000000f0  000000f0  2**4
>>                  CONTENTS, ALLOC, LOAD, READONLY, DATA
>>  9 .rodata.str1.4 000005fe  00000280  00000280  00000280  2**2
>>                  CONTENTS, ALLOC, LOAD, READONLY, DATA
>
> OK. I think that the final .rodata.str1.4 section is causing your
> problem because the offset between its load address and the other
> section is huge, causing "objcopy -O binary" to generate a huge file.
> This is a new section generated by gcc 3.x and above to hold mergeable
> constant data. Try changing the line in your linker script which (I'm
> guessing here) probably looks like this:
>
>    *(.rodata)
>
> to:
>
>     *(.rodata) *(.rodata.*)
>

I failed to spot that .rodata also has a "bad" load address. So it looks
like .rodata also isn't correctly handled in your linker script.

you are right, i do not handle it correctly, and now i fixed it and
the objcopy run with out warning.



Nigel




thanks for all above
Best Regards
zhuzhenhua

<Prev in Thread] Current Thread [Next in Thread>