[PATCH] gas: drop pointless tc_fix_adjustable()
Jan Beulich
jbeulich@suse.com
Fri Jan 30 07:31:01 GMT 2026
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.
--- 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
--- a/gas/config/tc-kvx.h
+++ b/gas/config/tc-kvx.h
@@ -267,19 +267,6 @@ extern int kvx_force_reloc_sub_same (str
&& 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
mailing list