For projects compiled with a non-zero -G value, the $gp register can be used to access symbols defined and within the current TU, that are smaller than the -G limit.
For asm segments, the accesses are wrapped in the %gp_rel() which is great, as these files are usually compiled with as from modern binutils. However when projects use INCLUDE_ASM macros to include assembly snippets, the %gp_rel() macro trips up the old assemblers and so compilation fails.
These projects are currently grep-ing/sed-ing through the nonmatching/asm/... files to remove the macro. It would be better if the use of the %gp_rel() macro could be configured and turned on and off. I believe there is currently something around %gp_rel() when the compiler is set to SN64, but I would need to look at the code to remind myself.
Potential naming (better suggestions are appreciated!)
For projects compiled with a non-zero
-G
value, the$gp
register can be used to access symbols defined and within the current TU, that are smaller than the-G
limit.For
asm
segments, the accesses are wrapped in the%gp_rel()
which is great, as these files are usually compiled with as from modern binutils. However when projects useINCLUDE_ASM
macros to include assembly snippets, the%gp_rel()
macro trips up the old assemblers and so compilation fails.These projects are currently
grep
-ing/sed
-ing through thenonmatching/asm/...
files to remove the macro. It would be better if the use of the%gp_rel()
macro could be configured and turned on and off. I believe there is currently something around%gp_rel()
when the compiler is set toSN64
, but I would need to look at the code to remind myself.Potential naming (better suggestions are appreciated!)