ref: 55b911654c59ad24258995d697f56bf1d56a96e1
parent: 7c8eba9fd2e7e5c56d54aac4cd0bb707a93da098
author: ISSOtm <[email protected]>
date: Tue Mar 10 21:46:26 EDT 2020
Get rid of obsoleted function
--- a/include/asm/symbol.h
+++ b/include/asm/symbol.h
@@ -111,7 +111,6 @@
struct sSymbol *sym_AddString(char const *tzSym, char const *tzValue);
uint32_t sym_GetDefinedValue(char const *s);
void sym_Purge(char const *tzName);
-bool sym_IsRelocDiffDefined(char const *tzSym1, char const *tzSym2);
/* Functions to save and restore the current symbol scope. */
struct sSymbol *sym_GetCurrentSymbolScope(void);
--- a/src/asm/symbol.c
+++ b/src/asm/symbol.c
@@ -587,53 +587,6 @@
}
/*
- * Check if the subtraction of two symbols is defined. That is, either both
- * symbols are defined and the result is a constant, or both symbols are
- * relocatable and belong to the same section.
- *
- * It returns 1 if the difference is defined, 0 if not.
- */
-bool sym_IsRelocDiffDefined(char const *tzSym1, char const *tzSym2)
-{
- const struct sSymbol *nsym1 = sym_FindSymbol(tzSym1);
- const struct sSymbol *nsym2 = sym_FindSymbol(tzSym2);
-
- /* Do the symbols exist? */
- if (nsym1 == NULL)
- fatalerror("Symbol \"%s\" isn't defined.", tzSym1);
-
- if (nsym2 == NULL)
- fatalerror("Symbol \"%s\" isn't defined.", tzSym2);
-
- int32_t s1const = sym_IsConstant(nsym1);
- int32_t s2const = sym_IsConstant(nsym2);
-
- /* Both are non-relocatable */
- if (s1const && s2const)
- return true;
-
- /* One of them is relocatable, the other one is not. */
- if (s1const ^ s2const)
- return false;
-
- /*
- * Both of them are relocatable. Make sure they are defined (internal
- * coherency with sym_AddReloc and sym_AddLocalReloc).
- */
- if (!sym_IsDefined(nsym1))
- fatalerror("Label \"%s\" isn't defined.", tzSym1);
-
- if (!sym_IsDefined(nsym2))
- fatalerror("Label \"%s\" isn't defined.", tzSym2);
-
- /*
- * Both of them must be in the same section for the difference to be
- * defined.
- */
- return nsym1->pSection == nsym2->pSection;
-}
-
-/*
* Export a symbol
*/
void sym_Export(char const *tzSym)