From 38bca7bb10447076502a218bc012b21aabd41125 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sat, 9 Dec 2017 06:39:05 +0000 Subject: recognize .openbsd.randomdata section and indicate it roughly, so that objects within it are identified as being in read-only space. ok guenther --- usr.bin/nm/elf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr.bin/nm') 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)) -- cgit v1.2.3