diff --git a/include/link/symbol.hpp b/include/link/symbol.hpp index 67558c52..013f106f 100644 --- a/include/link/symbol.hpp +++ b/include/link/symbol.hpp @@ -29,16 +29,6 @@ struct Symbol { struct Section *section; }; -/* - * Execute a callback for each symbol currently registered. - * This is done to avoid exposing the data structure in which symbol are stored. - * @param callback The function to call for each symbol; - * the first argument will be a pointer to the symbol, - * the second argument will be the pointer `arg`. - * @param arg A pointer which will be passed to all calls to `callback`. - */ -void sym_ForEach(void (*callback)(struct Symbol *, void *), void *arg); - void sym_AddSymbol(struct Symbol *symbol); /* diff --git a/src/link/symbol.cpp b/src/link/symbol.cpp index ec702d0e..46aeb550 100644 --- a/src/link/symbol.cpp +++ b/src/link/symbol.cpp @@ -13,25 +13,6 @@ HashMap symbols; -struct ForEachSymbolArg { - void (*callback)(struct Symbol *symbol, void *arg); - void *arg; -}; - -static void forEach(void *symbol, void *arg) -{ - struct ForEachSymbolArg *callbackArg = (struct ForEachSymbolArg *)arg; - - callbackArg->callback((struct Symbol *)symbol, callbackArg->arg); -} - -void sym_ForEach(void (*callback)(struct Symbol *, void *), void *arg) -{ - struct ForEachSymbolArg callbackArg = { .callback = callback, .arg = arg }; - - hash_ForEach(symbols, forEach, &callbackArg); -} - void sym_AddSymbol(struct Symbol *symbol) { // Check if the symbol already exists