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: PR 12001, --defsym


On Thu, Jan 13, 2011 at 8:24 AM, Hans-Peter Nilsson <hp@bitrange.com> wrote:
> On Thu, 13 Jan 2011, H.J. Lu wrote:
>> > mmix ?+FAIL: ld-scripts/defined4
>>
>> I got
>>
>> [hjl@gnu-6 ld]$ ../binutils/objdump -t -h tmpdir/dump
>>
>> tmpdir/dump: ? ? file format mmo
>>
>> Sections:
>> Idx Name ? ? ? ? ?Size ? ? ?VMA ? ? ? ? ? ? ? LMA ? ? ? ? ? ? ? File off ?Algn
>> ? 0 .text ? ? ? ? 00000000 ?0000000000000000 ?0000000000000000 ?00000000 ?2**2
>>
>> ? 1 .data ? ? ? ? 00000002 ?0000000000000000 ?0000000000000000 ?00000000 ?2**2
>> ? ? ? ? ? ? ? ? ? CONTENTS, ALLOC, LOAD, DATA
>> SYMBOL TABLE:
>> 0000000000000000 g ? ? ? .text Main
>> 0000000000000000 g ? ? ? .text defined1
>> 0000000000000000 g ? ? ? .text defined
>>
>> Don't know why symbols are in .text section. I will skip it also.
>
> The "mmo" object (or rather, executable) format is very limited
> and symbols are just numbers (or absolute values if you like):
> the mapping to sections is done heuristically according to the
> values and whatever sections there are, hence ".text" here.
> Having said that, I realize that the heuristic got this
> corner-case wrong: the .text section is empty and there is a
> non-empty .data section, with defined/defined1 better described
> as having the first address there. ?So, a true bug. ?Not a very
> important one, though. ?But since you asked...
>

Feel free to change ld-scripts/defined4.

-- 
H.J.


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