* [PATCH] libebl: SHT_(INIT|FINI|PREINIT)_ARRAY are valid targets for relocation.
@ 2015-06-12 10:52 Mark Wielaard
0 siblings, 0 replies; 4+ messages in thread
From: Mark Wielaard @ 2015-06-12 10:52 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 1665 bytes --]
Seen in run-elflint-self.sh for size.o when build with --enable-gcov.
https://bugzilla.redhat.com/show_bug.cgi?id=1230798
Signed-off-by: Mark Wielaard <mjw@redhat.com>
---
libebl/ChangeLog | 5 +++++
libebl/eblcheckreloctargettype.c | 6 ++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/libebl/ChangeLog b/libebl/ChangeLog
index 51ae60f..4305cf6 100644
--- a/libebl/ChangeLog
+++ b/libebl/ChangeLog
@@ -1,3 +1,8 @@
+2015-06-12 Mark Wielaard <mjw@redhat.com>
+
+ * eblcheckreloctargettype.c (ebl_check_reloc_target_type): Allow
+ SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
+
2015-05-17 Mark Wielaard <mjw@redhat.com>
* eblobjnote.c (ebl_object_note): If allocation buf is large, then
diff --git a/libebl/eblcheckreloctargettype.c b/libebl/eblcheckreloctargettype.c
index e135f8a..dc6de92 100644
--- a/libebl/eblcheckreloctargettype.c
+++ b/libebl/eblcheckreloctargettype.c
@@ -1,5 +1,5 @@
/* Check whether a section type is a valid target for relocation.
- Copyright (C) 2014 Red Hat, Inc.
+ Copyright (C) 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
@@ -39,7 +39,9 @@ ebl_check_reloc_target_type (Ebl *ebl, Elf64_Word sh_type)
if (ebl->check_reloc_target_type (ebl, sh_type))
return true;
- if (sh_type == SHT_PROGBITS || sh_type == SHT_NOBITS)
+ if (sh_type == SHT_PROGBITS || sh_type == SHT_NOBITS
+ || sh_type == SHT_INIT_ARRAY || sh_type == SHT_FINI_ARRAY
+ || sh_type == SHT_PREINIT_ARRAY)
return true;
return false;
--
1.8.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] libebl: SHT_(INIT|FINI|PREINIT)_ARRAY are valid targets for relocation.
@ 2015-06-14 21:13 Mark Wielaard
0 siblings, 0 replies; 4+ messages in thread
From: Mark Wielaard @ 2015-06-14 21:13 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 397 bytes --]
On Fri, Jun 12, 2015 at 10:12:45AM -0400, Lukas Berk wrote:
> Mark Wielaard <mjw@redhat.com> writes:
> > Seen in run-elflint-self.sh for size.o when build with --enable-gcov.
> > https://bugzilla.redhat.com/show_bug.cgi?id=1230798
>
> The patch fixes the issue for me. Thanks.
Thanks for testing.
Pushed with the change to a switch statement as suggested by Roland.
Cheers,
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] libebl: SHT_(INIT|FINI|PREINIT)_ARRAY are valid targets for relocation.
@ 2015-06-12 17:33 Roland McGrath
0 siblings, 0 replies; 4+ messages in thread
From: Roland McGrath @ 2015-06-12 17:33 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 84 bytes --]
With that many ||s I'd make it a switch.
But the substantive change seems fine.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] libebl: SHT_(INIT|FINI|PREINIT)_ARRAY are valid targets for relocation.
@ 2015-06-12 14:12 Lukas Berk
0 siblings, 0 replies; 4+ messages in thread
From: Lukas Berk @ 2015-06-12 14:12 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 247 bytes --]
Hey Mark,
Mark Wielaard <mjw@redhat.com> writes:
> Seen in run-elflint-self.sh for size.o when build with --enable-gcov.
> https://bugzilla.redhat.com/show_bug.cgi?id=1230798
The patch fixes the issue for me. Thanks.
Cheers,
Lukas
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-06-14 21:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-12 10:52 [PATCH] libebl: SHT_(INIT|FINI|PREINIT)_ARRAY are valid targets for relocation Mark Wielaard
2015-06-12 14:12 Lukas Berk
2015-06-12 17:33 Roland McGrath
2015-06-14 21:13 Mark Wielaard
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).