summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2014-05-19 16:52:56 +0200
committerMark Wielaard <[email protected]>2014-05-19 22:04:24 +0200
commit028d0ab0cc1cb5f96ee48feef966b7d8d56c6a8e (patch)
treea8217d678cede635782d0fe33413a3dc3ae206af /src
parent85482fc073442a056e0e3663eb454fa76d883271 (diff)
backends: Add ebl_check_reloc_target_type.
And implement for arm and ia64. Both have special section types that are valid targets for a reloc. Both refer to unwind data. elflint now just calls ebl_check_reloc_target_type instead of hard coding the expected section types. Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/elflint.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 341787d6..4197ccd9 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2014-05-19 Mark Wielaard <[email protected]>
+
+ * elflint.c (check_reloc_shdr): Check ebl_check_reloc_target_type.
+
2014-05-01 Mark Wielaard <[email protected]>
* readelf.c (find_no_debuginfo): Call dwfl_standard_find_debuginfo
diff --git a/src/elflint.c b/src/elflint.c
index 5a500b76..bf6d044b 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -1216,8 +1216,7 @@ check_reloc_shdr (Ebl *ebl, const GElf_Ehdr *ehdr, const GElf_Shdr *shdr,
destshdr_memp);
if (*destshdrp != NULL)
{
- if((*destshdrp)->sh_type != SHT_PROGBITS
- && (*destshdrp)->sh_type != SHT_NOBITS)
+ if(! ebl_check_reloc_target_type (ebl, (*destshdrp)->sh_type))
{
reldyn = is_rel_dyn (ebl, ehdr, idx, shdr, true);
if (!reldyn)