This is the mail archive of the 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: pe-i386 reloc overflow

For posterity and/or in the hope that this will sufficiently
pique someone's interest to have a go at properly fixing
this, here's how to repro the bug:

   foo$ wget
   foo$ gzip -d libHSstd.a.gz
   foo$ ld -r -o mound.o --whole-archive libHSstd.a
   foo$ objdump -r mound.o

which will cause objdump to crash on the (ill-formed)
object file.

This is with HEAD built with either
--host=i386-pc-mingw32 or --host=i386-pc-cygwin


----- Original Message ----- 
From: "Sigbjorn Finne" <>
To: <>
Sent: Tuesday, January 29, 2002 23:46
Subject: Re: pe-i386 reloc overflow

> I believe I've located the cause of the 'ld -r' misbehaviour
> re: extended relocs - bfd/cofflink.c:_bfd_coff_final_link()
> fails to emit a reloc table containing the extra first
> entry - attached is a patch to cofflink.c which adds
> the missing bits.
> Now, bfd/cofflink.c contains generic COFFery, so
> injecting backend (PE in this case) specific portions
> like this is not the right way to go about it. If someone
> would be willing to work with me and/or point me in
> the right direction for this 'ld -r' fix to be in a shape
> worthy of consideration for inclusion, I'd really
> appreciate it.
> thanks,
> --sigbjorn

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