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

Momchil Velikov velco@fadata.bg
Sat Apr 1 08:33:00 GMT 2000


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
$ 

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

	(ppc_elf_adjust_sda_base): New function. Adjusts the value
	for a small data section base symbols.  
	(ppc_elf_final_link): New function. Makes sure the values of
	_SDA_BASE_ and _SDA2_BASE_ are adjusted before the final link.  
	(bfd_elf32_bfd_final_link): Define it to `ppc_elf_final_link'.



More information about the Binutils mailing list