[tip: timers/vdso] sparc64: vdso2c: Remove symbol handling

From: tip-bot2 for Thomas Weißschuh

Date: Wed Mar 11 2026 - 05:45:17 EST


The following commit has been merged into the timers/vdso branch of tip:

Commit-ID: 168d23e5762b8bad9c7a14b130179dc561c0b13a
Gitweb: https://git.kernel.org/tip/168d23e5762b8bad9c7a14b130179dc561c0b13a
Author: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
AuthorDate: Wed, 04 Mar 2026 08:49:09 +01:00
Committer: Thomas Gleixner <tglx@xxxxxxxxxx>
CommitterDate: Wed, 11 Mar 2026 10:18:33 +01:00

sparc64: vdso2c: Remove symbol handling

There are no handled symbols left.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Tested-by: Andreas Larsson <andreas@xxxxxxxxxxx>
Reviewed-by: Andreas Larsson <andreas@xxxxxxxxxxx>
Acked-by: Andreas Larsson <andreas@xxxxxxxxxxx>
Link: https://patch.msgid.link/20260304-vdso-sparc64-generic-2-v6-12-d8eb3b0e1410@xxxxxxxxxxxxx
---
arch/sparc/vdso/vdso2c.c | 10 +----------
arch/sparc/vdso/vdso2c.h | 41 +---------------------------------------
2 files changed, 1 insertion(+), 50 deletions(-)

diff --git a/arch/sparc/vdso/vdso2c.c b/arch/sparc/vdso/vdso2c.c
index 70b14a4..e5c6121 100644
--- a/arch/sparc/vdso/vdso2c.c
+++ b/arch/sparc/vdso/vdso2c.c
@@ -58,14 +58,6 @@

const char *outfilename;

-struct vdso_sym {
- const char *name;
- int export;
-};
-
-struct vdso_sym required_syms[] = {
-};
-
__attribute__((format(printf, 1, 2))) __attribute__((noreturn))
static void fail(const char *format, ...)
{
@@ -105,8 +97,6 @@ static void fail(const char *format, ...)
#define PUT_BE(x, val) \
PBE(x, val, 64, PBE(x, val, 32, PBE(x, val, 16, LAST_PBE(x, val))))

-#define NSYMS ARRAY_SIZE(required_syms)
-
#define BITSFUNC3(name, bits, suffix) name##bits##suffix
#define BITSFUNC2(name, bits, suffix) BITSFUNC3(name, bits, suffix)
#define BITSFUNC(name) BITSFUNC2(name, ELF_BITS, )
diff --git a/arch/sparc/vdso/vdso2c.h b/arch/sparc/vdso/vdso2c.h
index ba07946..bad6a05 100644
--- a/arch/sparc/vdso/vdso2c.h
+++ b/arch/sparc/vdso/vdso2c.h
@@ -17,11 +17,9 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len,
unsigned long mapping_size;
int i;
unsigned long j;
- ELF(Shdr) *symtab_hdr = NULL, *strtab_hdr;
+ ELF(Shdr) *symtab_hdr = NULL;
ELF(Ehdr) *hdr = (ELF(Ehdr) *)raw_addr;
ELF(Dyn) *dyn = 0, *dyn_end = 0;
- INT_BITS syms[NSYMS] = {};
-
ELF(Phdr) *pt = (ELF(Phdr) *)(raw_addr + GET_BE(&hdr->e_phoff));

/* Walk the segment table. */
@@ -72,38 +70,6 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len,
if (!symtab_hdr)
fail("no symbol table\n");

- strtab_hdr = raw_addr + GET_BE(&hdr->e_shoff) +
- GET_BE(&hdr->e_shentsize) * GET_BE(&symtab_hdr->sh_link);
-
- /* Walk the symbol table */
- for (i = 0;
- i < GET_BE(&symtab_hdr->sh_size) / GET_BE(&symtab_hdr->sh_entsize);
- i++) {
- int k;
-
- ELF(Sym) *sym = raw_addr + GET_BE(&symtab_hdr->sh_offset) +
- GET_BE(&symtab_hdr->sh_entsize) * i;
- const char *name = raw_addr + GET_BE(&strtab_hdr->sh_offset) +
- GET_BE(&sym->st_name);
-
- for (k = 0; k < NSYMS; k++) {
- if (!strcmp(name, required_syms[k].name)) {
- if (syms[k]) {
- fail("duplicate symbol %s\n",
- required_syms[k].name);
- }
-
- /*
- * Careful: we use negative addresses, but
- * st_value is unsigned, so we rely
- * on syms[k] being a signed type of the
- * correct width.
- */
- syms[k] = GET_BE(&sym->st_value);
- }
- }
- }
-
if (!name) {
fwrite(stripped_addr, stripped_len, 1, outfile);
return;
@@ -129,10 +95,5 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len,
fprintf(outfile, "const struct vdso_image %s_builtin = {\n", name);
fprintf(outfile, "\t.data = raw_data,\n");
fprintf(outfile, "\t.size = %lu,\n", mapping_size);
- for (i = 0; i < NSYMS; i++) {
- if (required_syms[i].export && syms[i])
- fprintf(outfile, "\t.sym_%s = %" PRIi64 ",\n",
- required_syms[i].name, (int64_t)syms[i]);
- }
fprintf(outfile, "};\n");
}