[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/1391] objcopy trashes PE executable when using "add-gnu-de

From: nickc at redhat dot com
Subject: [Bug binutils/1391] objcopy trashes PE executable when using "add-gnu-debuglink"
Date: 26 Jan 2006 14:56:45 -0000

------- Additional Comments From nickc at redhat dot com  2006-01-26 14:56 
Subject: Re:  objcopy trashes PE executable when using

Hi Brian,

>>      PR binutils/1391
>>      * objcopy.c (copy_object): For PE format targets set the VMA of a
>>      newly created gnu_debuglink section to a non-zero, aligned,
>>      contiguous value.
>>      * Makefile.am (objcopy.c): Add a dependency upon libbfd.h.
>>      * Makefile.in: Regenerate.
> Sorry.  I was waiting to reply until I had a chance to test it, and time has
> been in short supply lately.  Two questions though:
> Pedantically, doesn't this patch belong in bfd/opncls.c
> (bfd_create_gnu_debuglink_section)? 

Actually I think not.  That function just creates the debuglink section, 
in much the same way as the bfd_make_section() function just creates a 
normal section.  It is up to other code to decide what to do with these 
created sections.  Objcopy decides to insert it into the binary file it 
is creating, therefore it is objcopy's responsibility to select a VMA 
for it.  Another user of the bfd_create_gnu_debuglink_section() might 
decide to do something else with it, and may not even include it in an 
output file.

What was the other question ? :-)




------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]