summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2017-12-09 06:39:05 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2017-12-09 06:39:05 +0000
commit38bca7bb10447076502a218bc012b21aabd41125 (patch)
treeb34f37315bc31f7ab00903c695da62d672832710
parent104faa3480cf1622d0af2bea084cb88f4fa34eb4 (diff)
recognize .openbsd.randomdata section and indicate it roughly, so
that objects within it are identified as being in read-only space. ok guenther
-rw-r--r--usr.bin/nm/elf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/nm/elf.c b/usr.bin/nm/elf.c
index 5f2d14b27f3..955c07eceba 100644
--- a/usr.bin/nm/elf.c
+++ b/usr.bin/nm/elf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: elf.c,v 1.35 2017/10/27 16:47:08 mpi Exp $ */
+/* $OpenBSD: elf.c,v 1.36 2017/12/09 06:39:04 deraadt Exp $ */
/*
* Copyright (c) 2003 Michael Shalayeff
@@ -320,6 +320,8 @@ elf_shn2type(Elf_Ehdr *eh, u_int shn, const char *sn)
return (N_TEXT);
else if (!strcmp(sn, ELF_RODATA))
return (N_SIZE);
+ else if (!strcmp(sn, ELF_OPENBSDRANDOMDATA))
+ return (N_SIZE);
else if (!strcmp(sn, ELF_DATA))
return (N_DATA);
else if (!strcmp(sn, ELF_SDATA))