summaryrefslogtreecommitdiffstats
path: root/src/elfcmp.c
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2008-02-21 06:19:39 +0000
committerRoland McGrath <[email protected]>2008-02-21 06:19:39 +0000
commit059c83e5db89955913a39fe6705acca571c32c3f (patch)
tree9eaf08fd255365d45be91bb3bf288194ffa423e5 /src/elfcmp.c
parent712d78eced9020ccfa1c27d32c2929cf16398293 (diff)
Finish elflint .gnu.attributes checking
Diffstat (limited to 'src/elfcmp.c')
-rw-r--r--src/elfcmp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/elfcmp.c b/src/elfcmp.c
index be9aaccd..0e134df8 100644
--- a/src/elfcmp.c
+++ b/src/elfcmp.c
@@ -1,5 +1,5 @@
/* Compare relevant content of two ELF files.
- Copyright (C) 2005, 2006, 2007 Red Hat, Inc.
+ Copyright (C) 2005, 2006, 2007, 2008 Red Hat, Inc.
This file is part of Red Hat elfutils.
Written by Ulrich Drepper <[email protected]>, 2005.
@@ -259,7 +259,9 @@ main (int argc, char *argv[])
// XXX Any flags which should be ignored?
|| shdr1->sh_flags != shdr2->sh_flags
|| shdr1->sh_addr != shdr2->sh_addr
- || shdr1->sh_offset != shdr2->sh_offset
+ || (shdr1->sh_offset != shdr2->sh_offset
+ && (shdr1->sh_flags & SHF_ALLOC)
+ && ehdr1->e_type != ET_REL)
|| shdr1->sh_size != shdr2->sh_size
|| shdr1->sh_link != shdr2->sh_link
|| shdr1->sh_info != shdr2->sh_info