* Re: bfd/elf.c: if (oheader->sh_type == oheader->sh_type)
[not found] <55C9B842.4030603@aegee.org>
@ 2015-08-11 10:53 ` H.J. Lu
0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2015-08-11 10:53 UTC (permalink / raw)
To: Dilyan Palauzov, Binutils
On Tue, Aug 11, 2015 at 1:54 AM, Dilyan Palauzov
<dilyan.palauzov@aegee.org> wrote:
> Hello,
>
> commit d4ac1f87 "Check sh_type/sh_flags/sh_addralign/sh_entsize when
> copying sh_link/sh_info" puts in bfd/elf.c:
>
> if ((oheader->sh_type == SHT_NOBITS
> || oheader->sh_type == oheader->sh_type)
>
> and gcc6.0 complains, that "oheader->sh_type == oheader->sh_type" always
> evaluates to true.
>
I checked this in to fix it.
Thanks.
--
H.J.
---
From 64140f86ab732f9ed87beccab07c32befaf9ca52 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Tue, 11 Aug 2015 03:50:17 -0700
Subject: [PATCH] Fix a typo in _bfd_elf_copy_private_bfd_data
* elf.c (_bfd_elf_copy_private_bfd_data): Fix a typo.
---
bfd/ChangeLog | 6 +++++-
bfd/elf.c | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 97ed6ea..91d41d3 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf.c (_bfd_elf_copy_private_bfd_data): Fix a typo.
+
2015-08-10 H.J. Lu <hongjiu.lu@intel.com>
* elf-bfd.h (elf_symbol_version): New enum.
@@ -19,7 +23,7 @@
PR binutils/18785
* elf.c (_bfd_elf_copy_private_bfd_data): When copying the
sh_link and sh_info fields in stripped section headers, we also
- check if the sh_type, sh_flags, /sh_addralign and sh_entsize
+ check if the sh_type, sh_flags, sh_addralign and sh_entsize
fields of the output section match the output. Since
--only-keep-debug turns all non-debug sections into SHT_NOBITS
sections, the output SHT_NOBITS type matches any input type.
diff --git a/bfd/elf.c b/bfd/elf.c
index 9e401c8..15de37b 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1237,7 +1237,7 @@ _bfd_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
into SHT_NOBITS sections, the output SHT_NOBITS type
matches any input type. */
if ((oheader->sh_type == SHT_NOBITS
- || oheader->sh_type == oheader->sh_type)
+ || iheader->sh_type == oheader->sh_type)
&& iheader->sh_flags == oheader->sh_flags
&& iheader->sh_addralign == oheader->sh_addralign
&& iheader->sh_entsize == oheader->sh_entsize
--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-08-11 10:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <55C9B842.4030603@aegee.org>
2015-08-11 10:53 ` bfd/elf.c: if (oheader->sh_type == oheader->sh_type) H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).