[patch] Linker section contents not allocated (was: Re: Patch for ppc _SDA_BASE_ value)

Momchil Velikov velco@fadata.bg
Sat Apr 1 12:31:00 GMT 2000


Momchil Velikov wrote:
> 
> Hi,
> 
> The linker gets a fatal signal in finish_pointer_linker_section, because
> the section contents is not allocated. This patch creates the
> linker sections with the SEC_LINKER_CREATED flags set, so their contents
> is allocated in `ppc_elf_size_dynamic_sections'.
> 
> Demo:
> 
> $ cat > xx.s
>         .data
>         .global var
> var:
>         .long 0
> 
>         .text
>         .global foo
> foo:
>         lwz     %r3, var@sdai16(%r13)
> $ powerpc-svr4-gcc -c xx.s
> $ powerpc-svr4-ld -o xx -entry=foo xx.o
> Segmentation fault
> $

Oops, wrong files, here are the correct ones.

-velco
2000-04-01  Momchil Velikov  <velco@fadata.bg>

	* elf32-ppc.c (ppc_elf_create_linker_section): Create the linker
	sections with `SEC_LINKER_CREATED' flag set, so their contents
	is allocated in `ppc_elf_size_dynamic_sections'. 



More information about the Binutils mailing list