[Top][All Lists]

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

Re: [Bug binutils/1391] objcopy trashes PE executable when using "add-gn

From: Nick Clifton
Subject: Re: [Bug binutils/1391] objcopy trashes PE executable when using "add-gnu-debuglink"
Date: Thu, 26 Jan 2006 15:03:36 +0000
User-agent: Thunderbird 1.5 (X11/20051201)

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

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 ? :-)


reply via email to

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