bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/24493] objcopy produces .gnu_debuglink section with wrong


From: nickc at redhat dot com
Subject: [Bug binutils/24493] objcopy produces .gnu_debuglink section with wrong flags on MS-Windows
Date: Thu, 02 May 2019 14:09:06 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=24493

--- Comment #7 from Nick Clifton <nickc at redhat dot com> ---
(In reply to Eli Zaretskii from comment #6)

Hi Eli,

> Rebuilding GDB seems to fix the problem.  But a strange thing is that the
> rebuilt objdump shows the above 3 flags even for .gnu_debuglink section
> created by the unpatched objcopy.  Is that expected?

Yes.

> I thought the section
> flags were actually recorded in the file, and objdump only displays them,
> but it seems this is not the case with the patched Binutils.  Or am I
> confused?

Not confused, just stumbling over one the strange artefacts of the binutils.
What actually happens is that as the BFD library reads in the file it
translates the section flags from their native PE versions into its own
internal variants.  Unfortunately there is not a 1:1 mapping between these
two sets of flags, so sometimes you get strange results.  Objdump displays
the internal BFD flags, which is why you see something that does not appear
to be quite right.

But if GDB is happy, then I am happy, and I will check in the patch.

Cheers
  Nick

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

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