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: Adjust relocation type secrel for w64 and fix base-file/dlltool functionality


Hi Kai,

The patch was tested for x86_64-pc-mingw32. The secrel issue is, that PE+ has to use DIR64 for relocation and there is not suitable 32-bit ImageBase relocation present. The R_(I386|AMD64)_SECREL isn't a real coff relocation. It is mainly used for dwarf2. The problem fixed by this patch are the base relocations for w64 target for secrel (the second patch I sent for gas supporting .secrel64 is part necessary, too). dlltool emits at the moment HIGHLOW relocations, which have to be altered into DIR64 relocations for w64 and the size of the vma's have to be changed to bfd_vma instead of 'long' stored in the base-file.

Some test in the testsuite needs to be reworked completly for w64 in gas and ld. But first I wanted to get some response about the patch before adjusting them.

Ok - well the patch is approved, so please go ahead and apply it (and adjust the testsuite entries).


The most interesting question here is, if it wouldn't be better to alter the dwarf2 code for mingw in general. The idea was - as I spoke to Aaron about it - to use instead of .secrel for dwarf2 .rva an use the global __image_base to relocate the dwarf2 code. So we could get rid of the necessarity of base relocations in debug section at all and the implementation would be more near to the unix one.

Hmm, whilst it might be neater and simpler to be more like the unix implementation, would it actually solve any outstanding problems with the current system ?


Cheers
  Nick


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