CFA: pseudo-reloc v2

Charles Wilson cygwin@cwilson.fastmail.fm
Tue Oct 6 14:50:00 GMT 2009


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



More information about the Cygwin-developers mailing list