This is the mail archive of the binutils@sources.redhat.com 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]

Re: PPC linker fatal signal


>>>>> "Geoff" == Geoff Keating <geoffk@geoffk.org> writes:

>> Cc: binutils@sourceware.cygnus.com
>> From: Momchil Velikov <velco@fadata.bg>
>> Date: 19 Feb 2001 00:00:18 +0200
>> 
>> >>>>> "Geoff" == Geoff Keating <geoffk@geoffk.org> writes:
>> 
Geoff> I think this reflects a bug in your earlier patch.  The linker should
Geoff> complain about this:
>> 
Geoff> lwz	%r3, var@sdai16(%r13)
>> 
Geoff> because 'var' is in the .data section.
>> 
>> Actually, this does not depend on where is `var'. This
>> one gets the same signal for the same reason:
>> 
>> 
>> .section ".sdata", "rw"
>> .global var
>> var:
>> .long 1
>> 
>> .text
>> .global foo
>> foo:
>> lwz     %r3, var@sdai16(%r13)

Geoff> Oh, I see.

Geoff> This was changed to be the way it was in 1997, with this ChangeLog
Geoff> entry:

Geoff> 	* elf32-ppc.c (ppc_elf_howto_raw): Correct various comments.
Geoff> 	(ppc_elf_create_linker_section): These sections are not
Geoff> 	created by the linker (that is, they are created by the user
Geoff> 	putting data in them). In particular, they can be the source
Geoff> 	and target of relocations.
Geoff> ...

Geoff> I think this still holds; if you have a linker-created section it
Geoff> won't work properly if the user puts data in it that needs relocation.

I think the sections created in `ppc_elf_create_linker_section' don't
need relocation, they are filled in with already relocated values.

Regards,
-velco


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