The global offset table is spelled .TOC. on PPC64, so preserve that symbol.

This commit is contained in:
joerg 2020-02-20 22:52:10 +00:00
parent 8eecffe079
commit 8c0c92a33c
2 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.rump,v 1.124 2018/03/03 22:46:30 christos Exp $
# $NetBSD: Makefile.rump,v 1.125 2020/02/20 22:52:10 joerg Exp $
#
.if !defined(_RUMP_MK)
@ -235,7 +235,7 @@ __archivebuild: .USE
.endif
for renameobj in ${RUMP_SYMREN:U${.ALLSRC:C/(${RUMPOBJ_NORENAME:ts|})//g}}; do \
${NM} -go $${renameobj} | ${TOOL_AWK} ' \
$$NF!~/^'${_PQ}'(rump|RUMP|__|_GLOBAL_OFFSET_TABLE'${_SYMQUIRK}'${RUMP_SYM_NORENAME:D|${RUMP_SYM_NORENAME}})/ \
$$NF!~/^'${_PQ}'(rump|RUMP|__|_GLOBAL_OFFSET_TABLE|\.TOC\.'${_SYMQUIRK}'${RUMP_SYM_NORENAME:D|${RUMP_SYM_NORENAME}})/ \
{s=$$NF;sub(/^'${_PQ}'/, "&rumpns_", s); print $$NF, s}'\
| sort | uniq > renametab.$${renameobj}; \
${OBJCOPY} --preserve-dates --redefine-syms \

View File

@ -1,4 +1,4 @@
/* $NetBSD: kobj_rename.c,v 1.2 2014/04/25 18:31:35 pooka Exp $ */
/* $NetBSD: kobj_rename.c,v 1.3 2020/02/20 22:52:10 joerg Exp $ */
/*-
* Copyright (c) 2010 Antti Kantee. All Rights Reserved.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kobj_rename.c,v 1.2 2014/04/25 18:31:35 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: kobj_rename.c,v 1.3 2020/02/20 22:52:10 joerg Exp $");
#define ELFSIZE ARCH_ELFSIZE
@ -49,6 +49,7 @@ const char *norentab[] = {
"rump",
"__",
"_GLOBAL_OFFSET_TABLE",
".TOC.",
};
static int
norename(const char *name)