From: deraadt Date: Sat, 9 Dec 2017 06:39:04 +0000 (+0000) Subject: recognize .openbsd.randomdata section and indicate it roughly, so X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=06ccf07d57108feda0eb7c7685d5ad7a21737472;p=openbsd recognize .openbsd.randomdata section and indicate it roughly, so that objects within it are identified as being in read-only space. ok guenther --- 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))