This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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]

PIC and arm/linux-crt0.S


The manner in which arm/linux-crt0.S writes to environ is not
compatible with PIC. So, I can either...

* patch linux-crt0.S and write the PIC store operation in assembler
	(I'm more inclined to let the compiler do this for me)
* have _start call _main instead of main and do the write there
	* and add _main to linux-syscalls1.c
	* or create a new linux-crt1.c to hold _main.

How is this matter usually handled?

Cheers!
Shaun

n.b. that the offending instruction is...
	ldr r3, =environ
... which causes a R_ARM_ABS32 relocation in the .text section. Most unkind.


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