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

Re: RFA: pseudo-relocations for pe targets


Hi Brian,

Brian Dessent <brian@dessent.net> wrote on 11.11.2008 14:59:37:

> Kai Tietz wrote:
> 
> > It would be very kind, if somebody could verify this patch on cygwin 
for
> > no side-effects.
> 
> I don't see how you can propose changing the size of the data structure
> that holds the list of pseudo-relocs without touching the runtime part
> of the code in Cygwin that actually does the relocating
> (winsup/cygwin/lib/pseudo-reloc.c).  And similarly with the code in the
> 32 bit MinGW runtime.  This adds a versioning problem in that now the
> version of the linker and the version of libcygwin.a have to both agree
> otherwise you link an executable that contains a v2 list but whose
> runtime support expects to read a v1 list, or vice versa.  There
> currently exists no such close coupling, and creating one is going to
> break all kinds of things and surprise many people.
> 
> It seems to me that the only possible way that you could pull off such a
> change in any sane way would be to have the runtime relocator be able to
> detect dynamically at runtime whether the linker that was used created a
> v1 or a v2 list, and act appropriately.  Then you leave v1 the default
> until that version of libcygwin.a had been reasonably widely distributed
> (several releases), and then you can make v2 the default.  But I don't
> see how you can just switch to v2 like this.
> 
> Brian
> 

as you may saw in prior comments (or by source code), this is exactly the 
reason why I introduced version 1 and version 2. And as I told before for 
32-bit targets version 1 (the old pseudo-relocation fixup structure) is 
written by default. So there should be no change in runtime for now (and 
the new pseudo-reloc.c file for version 2 is for sure not needed. I 
prepare at the moment additionally a version of the pseudo-reloc.c file, 
which is able to choose the proper relocation type by itself, but there 
should be at the moment no need to change this for 32-bit! 

Cheers,
Kai

|  (\_/)  This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.


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