lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 29 Jun 2018 17:25:38 -0400
From:   Simon Ser <contact@...rsion.fr>
To:     jpoimboe@...hat.com
Cc:     emersion <contact@...rsion.fr>, linux-kernel@...r.kernel.org
Subject: [PATCH] objtool: use .strtab if .shstrtab is not present

Executables that are generated by Clang don't have a .shstrtab
section, and store section names in .strtab instead. We can store
section names generated by orc there in this case.

Signed-off-by: Simon Ser <contact@...rsion.fr>
---
 tools/objtool/elf.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c
index 4e60e105583..6b9705d8b55 100644
--- a/tools/objtool/elf.c
+++ b/tools/objtool/elf.c
@@ -507,7 +507,10 @@ struct section *elf_create_section(struct elf *elf, const char *name,
 	/* Add section name to .shstrtab */
 	shstrtab = find_section_by_name(elf, ".shstrtab");
 	if (!shstrtab) {
-		WARN("can't find .shstrtab section");
+		shstrtab = find_section_by_name(elf, ".strtab");
+	}
+	if (!shstrtab) {
+		WARN("can't find .shstrtab or .strtab section");
 		return NULL;
 	}
 
-- 
2.18.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ