This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
RE: bfd/peigen.c problems and fix
- To: Donn Terry <donnte at microsoft dot com>
- Subject: RE: bfd/peigen.c problems and fix
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Thu, 4 May 2000 11:16:44 +1000 (EST)
- cc: Martin Kahlert <martin dot kahlert at mchp dot siemens dot de>, binutils at sourceware dot cygnus dot com
On Wed, 3 May 2000, Donn Terry wrote:
> (To answer your last question first:) COFF_WITH_PE applies to .obj
> files (or .o on Interix). COFF_IMAGE_WITH_PE applies to executables.
> (They're different file formats.) Here's what I get from
> objdump on a .o:
>
> hello.o: file format pe-i386
> architecture: i386, flags 0x0000003d:
> HAS_RELOC, HAS_LINENO, HAS_DEBUG, HAS_SYMS, HAS_LOCALS
> start address 0x00000000
>
> It *is* set on a PEI (Image/.exe) file.
$ cat zzz.s
.text
.globl _mainCRTStartup
_mainCRTStartup:
nop
$ gas/as-new -o zzz.o zzz.s
$ ld/ld-new -o zzz zzz.o
$ binutils/objdump -p zzz
zzz: file format pei-i386
Characteristics 0x207
relocations stripped
executable
line numbers stripped
debugging information removed
[rest snipped]
$ binutils/objdump -p /c/windows/view32.exe
/c/windows/view32.exe: file format pei-i386
Characteristics 0x10e
executable
line numbers stripped
symbols stripped
32 bit words
[rest snipped]
This is for --host=i586-linux --disable-nls --target=i586-mingw32
> As far as the other... I've glanced thru my patches (don't
> really have time to do it thoroughly at this moment) and
> it would appear that in cofflink.c/_bfd_generic_relocate_section
> that I have some carefully crafted code dealing with whether
> image_base is applied (Ian, as I said, has a pre-September
> copy); that may be the difference. Also, Ian and I had not
> resolved an issue about a lot obj_pe() tests that affected
> exactly how relocations are handled.
I thought that might be the case, which is why I emailed you about this
problem. Note that without my fix "objdump -p" core dumps on the
Windows95 exe files.
Regards, Alan Modra
--
Linuxcare. Support for the Revolution.