blob: 1737e0dbcc595d651c409b511d2f88e3a64fc560 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001From 33da4b4347aacdfb8b1b42e06e29e68a4b882d96 Mon Sep 17 00:00:00 2001
Brad Bishopa5c52ff2018-11-23 10:55:50 +13002From: Kurt Roeckx <kurt@roeckx.be>
Brad Bishop19323692019-04-05 15:28:33 -04003Date: Mon, 4 Mar 2019 09:45:00 +0000
4Subject: [PATCH] Make readelf -w output debug information on mips
Brad Bishopa5c52ff2018-11-23 10:55:50 +13005
6Upstreams wants a change where this is handled by a hook that needs
7to be filled in by the backend for the arch.
8
9Upstream-Status: Pending [from debian]
10Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
11
Brad Bishop19323692019-04-05 15:28:33 -040012---
13 src/readelf.c | 3 ++-
14 1 file changed, 2 insertions(+), 1 deletion(-)
15
16diff --git a/src/readelf.c b/src/readelf.c
17index 33706bd..ef13159 100644
18--- a/src/readelf.c
19+++ b/src/readelf.c
20@@ -11148,7 +11148,8 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr)
Brad Bishopa5c52ff2018-11-23 10:55:50 +130021 GElf_Shdr shdr_mem;
22 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
23
24- if (shdr != NULL && shdr->sh_type == SHT_PROGBITS)
25+ if (shdr != NULL && (
26+ (shdr->sh_type == SHT_PROGBITS) || (shdr->sh_type == SHT_MIPS_DWARF)))
27 {
28 static const struct
29 {