[binutils-gdb] gas: drop pointless tc_fix_adjustable()

Jan Beulich jbeulich@sourceware.org
Fri Feb 6 07:55:42 GMT 2026


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7af7f48454dc5ea900d13667807c225b24678c47

commit 7af7f48454dc5ea900d13667807c225b24678c47
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Feb 6 08:52:29 2026 +0100

    gas: drop pointless tc_fix_adjustable()
    
    Instances yielding constant 1 / true are meaningless, as that's write.c's
    default anyway. In KVX also drop TC_FIX_ADJUSTABLE(), which had no user
    already when KVX support was first introduced. Since the comment mentions
    them: Linkonce sections are taken care of in write.c.

Diff:
---
 gas/config/tc-i386.h |  1 -
 gas/config/tc-kvx.h  | 13 -------------
 2 files changed, 14 deletions(-)

diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h
index b2871b52a95..7e3f62badda 100644
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -141,7 +141,6 @@ int i386_validate_fix (struct fix *);
 #define tc_fix_adjustable(X)  tc_i386_fix_adjustable(X)
 extern int tc_i386_fix_adjustable (struct fix *);
 #else
-#define tc_fix_adjustable(X)  ((void)(X), 1)
 #define md_undefined_symbol(N) ((void)(N), NULL)
 #endif
 
diff --git a/gas/config/tc-kvx.h b/gas/config/tc-kvx.h
index 348708c34e1..69154834c58 100644
--- a/gas/config/tc-kvx.h
+++ b/gas/config/tc-kvx.h
@@ -267,19 +267,6 @@ extern int kvx_force_reloc_sub_same (struct fix *, segT);
        && S_IS_DEFINED ((FIX)->fx_addsy)                                       \
        && ! S_IS_COMMON ((FIX)->fx_addsy)))
 
-/* Local symbols will be adjusted against the section symbol.  */
-#define tc_fix_adjustable(fixP) 1
-
-/* This arranges for gas/write.c to not apply a relocation if
-   tc_fix_adjustable says it is not adjustable.  The "! symbol_used_in_reloc_p"
-   test is there specifically to cover the case of non-global symbols in
-   linkonce sections.  It's the generally correct thing to do though;  If a
-   reloc is going to be emitted against a symbol then we don't want to adjust
-   the fixup by applying the reloc during assembly.  The reloc will be applied
-   by the linker during final link.  */
-#define TC_FIX_ADJUSTABLE(fixP) \
-  (! symbol_used_in_reloc_p ((fixP)->fx_addsy) && tc_fix_adjustable (fixP))
-
 /* Force this to avoid -g to fail because of dwarf2 expression .L0 - .L0 */
 extern int kvx_validate_sub_fix (struct fix *fix);
 #define TC_VALIDATE_FIX_SUB(FIX, SEG)                                          \


More information about the Binutils-cvs mailing list