NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-vax/46715: Relocation in .text section in vax does not work
The following reply was made to PR port-vax/46715; it has been noted by GNATS.
From: <Paul_Koning%Dell.com@localhost>
To: <christos%zoulas.com@localhost>
Cc: <gnats-bugs%NetBSD.org@localhost>,
<port-vax-maintainer%netbsd.org@localhost>,
<gnats-admin%netbsd.org@localhost>, <netbsd-bugs%netbsd.org@localhost>
Subject: Re: port-vax/46715: Relocation in .text section in vax does not work
Date: Tue, 17 Jul 2012 18:37:48 +0000
On Jul 17, 2012, at 2:22 PM, Christos Zoulas wrote:
> On Jul 17, 4:00pm, paulkoning%comcast.net@localhost
> (paulkoning%comcast.net@localhost) wrote=
:
> -- Subject: port-vax/46715: Relocation in .text section in vax does not w=
ork
>=20
> The bug could be in many places, but not in ld.elf_so:
> 1. If the source is compiled with -fPIC or -fpic, then it should not emit
> R_VAX_32; if it does then it is an assembler bug.
In the sample program (bug.s) I supplied, the code as written is clearly no=
t PIC. And when assembling it, I didn't say -fpic or -fPIC, so I told the =
tool correctly.
> 2. If the source is not compiled with -fPIC or -fpic, then it is ok to
> emit R_VAX_32, but but then the linker should mark the object with
> DT_TEXTREL so that the rtld knows to mmap the text writable before
> doing relocations.
Where would I look for a DT_TEXTREL marking? objdump -R shows just a singl=
e entry, which is the one that is causing things to blow up.
> Can you investigate who is at fault? The package for not passing -f{PIC,p=
ic}?
> The assembler/linker? Both?
Sounds like the linker. For one thing, if it can give instructions to the =
loader on how to do the right thing, it should do so without spitting out c=
onfusing warnings.
ld is the one that comes stock with 5.1 -- "version 2.16.1 20051220".
paul
Home |
Main Index |
Thread Index |
Old Index