This is the mail archive of the binutils@sourceware.cygnus.com 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]

Re: objcopy elf->coff relocs


Thanx for the response, Ian.   More below.

Ian Lance Taylor wrote:
>    Date: Mon, 6 Sep 1999 16:32:10 -0500
>    From: Robert Lipe <robertl@sco.com>
> 
>    I have a reason to convert (simple) ELF i386 relocatables to COFF
>    format for an open-sourced project.  I had used objcopy for similar
> 
> objcopy doesn't really convert relocations.  In the general case it is
> impossible.  In specific cases it may be possible, but objcopy does
> not do the necessary transformations.  Moreover, the current BFD

I've now looked at a representative sample of the ELF i386 objects in
question.  The only types of relocs I spot are R_386_32 and R_386_PC32
and only against .text, .data, and .rodata.

For this specific case (ELF->COFF for those two reloc types on IA32)
could objcopy do enough conversion to be practical or do I have to
start thinking about implementing an ELF linker (cringe) for the target
environment?

Is objcopy likely doing something pretty close to the right thing and
"merely" forgetting to renumber the relocation type or is your warning
that there are deeper problems than this?  If you're warning that we
can't convert relocs reliably between two any arbitrary types, then I'm
just hoping that the limited scope of the problem makes this a tractable
task.

Thanx,
RJL

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