We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I'm not sure I know exactly what you mean by TEXTREL. I'm guessing it's a non-PC-relative relocation from a .text (or RO) section. (Such a relocation would have to be performed at load time (by a dynamic linker) for a shared object.)Unlike the compiler, the assembler has little or no choice about the relocations it produces. If you have something like ... IMPORT foo ... LDR r0,=foo or DCD foo ...then the assembler has to produce a non-PC-relative relocation.When you tell armasm '--apcs /fpic' you are promising that it is appropriate to mark the RO sections object code as position-independent. This is different from building C or C++ code where '--apcs /fpic' is telling the compiler to make sure the RO sections object code are position-independent.The assembler can't add the code needed to use a PC-relative relocation, but the compiler can.I don't think there's any solution besides finding out what asm constructs are producing the unwanted relocations and changing them. (Using asm macros might make it easier to maintain.)
... IMPORT foo ... LDR r0,=foo or DCD foo ...