summaryrefslogtreecommitdiffstats
path: root/sys/kern/link_elf_obj.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2010-11-14 20:14:25 +0000
committerdim <dim@FreeBSD.org>2010-11-14 20:14:25 +0000
commit756e9f53779b25e86ec78fa8ea80b869110fb7e5 (patch)
treee7ef401664063000bd5a4405863bbb31f320b00d /sys/kern/link_elf_obj.c
parent6a94c7762a006a9c28315abb507ae2508bf3d458 (diff)
downloadFreeBSD-src-756e9f53779b25e86ec78fa8ea80b869110fb7e5.zip
FreeBSD-src-756e9f53779b25e86ec78fa8ea80b869110fb7e5.tar.gz
Similar to sys/net/vnet.h, define the linker set name for sys/sys/pcpu.h
as a macro, and use it instead of literal strings.
Diffstat (limited to 'sys/kern/link_elf_obj.c')
-rw-r--r--sys/kern/link_elf_obj.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c
index c188852..e8e32a2 100644
--- a/sys/kern/link_elf_obj.c
+++ b/sys/kern/link_elf_obj.c
@@ -336,7 +336,7 @@ link_elf_link_preload(linker_class_t cls, const char *filename,
ef->progtab[pb].name =
ef->shstrtab + shdr[i].sh_name;
if (ef->progtab[pb].name != NULL &&
- !strcmp(ef->progtab[pb].name, "set_pcpu")) {
+ !strcmp(ef->progtab[pb].name, DPCPU_SETNAME)) {
void *dpcpu;
dpcpu = dpcpu_alloc(shdr[i].sh_size);
@@ -757,7 +757,7 @@ link_elf_load_file(linker_class_t cls, const char *filename,
else
ef->progtab[pb].name = "<<NOBITS>>";
if (ef->progtab[pb].name != NULL &&
- !strcmp(ef->progtab[pb].name, "set_pcpu"))
+ !strcmp(ef->progtab[pb].name, DPCPU_SETNAME))
ef->progtab[pb].addr =
dpcpu_alloc(shdr[i].sh_size);
#ifdef VIMAGE
@@ -789,7 +789,7 @@ link_elf_load_file(linker_class_t cls, const char *filename,
}
/* Initialize the per-cpu or vnet area. */
if (ef->progtab[pb].addr != (void *)mapbase &&
- !strcmp(ef->progtab[pb].name, "set_pcpu"))
+ !strcmp(ef->progtab[pb].name, DPCPU_SETNAME))
dpcpu_copy(ef->progtab[pb].addr,
shdr[i].sh_size);
#ifdef VIMAGE
@@ -911,7 +911,7 @@ link_elf_unload_file(linker_file_t file)
continue;
if (ef->progtab[i].name == NULL)
continue;
- if (!strcmp(ef->progtab[i].name, "set_pcpu"))
+ if (!strcmp(ef->progtab[i].name, DPCPU_SETNAME))
dpcpu_free(ef->progtab[i].addr,
ef->progtab[i].size);
#ifdef VIMAGE
OpenPOWER on IntegriCloud