This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: CFA: pseudo-reloc v2
- From: Charles Wilson <cygwin at cwilson dot fastmail dot fm>
- To: cygwin-developers at cygwin dot com
- Date: Tue, 06 Oct 2009 10:50:18 -0400
- Subject: Re: CFA: pseudo-reloc v2
- References: <4ACB555D.1000303@cwilson.fastmail.fm>
Charles Wilson wrote:
> v2 relocs will look like this:
>
> __RUNTIME_PSEUDO_RELOC_LIST__:
> .dword 0 ; .magic1
> .dword 0 ; .magic2
> .dword 0 ; .version = RP_VERSION_N
> .dword ? ; .addend (first actual reloc entry)
> .dword ? ; .target
> .dword ? ; .addend (second reloc entry)
> .dword ? ; .target
> ...
> .dword ? ; .addend (last reloc entry)
> .dword ? ; .target
> __RUNTIME_PSEUDO_RELOC_LIST_END__:
AAARGG. Dadgum cut-n-paste. The above structure is what you WOULD get
if binutils created a v1 reloc list with the "v2" header (and .version
would be RP_VERSION_1 == 0). It's supported by the runtime code, but no
existing binutils will create a reloc list of this form. They use either
the "original" v1 relocation list structure (without the 3-DWORD
header), OR they create a v2 structure as follows:
__RUNTIME_PSEUDO_RELOC_LIST__:
.dword 0 ; .magic1
.dword 0 ; .magic2
.dword 0 ; .version = RP_VERSION_2
.dword ? ; .sym (first actual reloc entry)
.dword ? ; .target
.dword ? ; .flags
.dword ? ; .sym (second reloc entry)
.dword ? ; .target
.dword ? ; .flags
...
.dword ? ; .sym (last reloc entry)
.dword ? ; .target
.dword ? ; .flags
__RUNTIME_PSEUDO_RELOC_LIST_END__:
Sorry for the confusion.
--
Chuck