Linking Assembly Files

It is always possible to link in an assembly file that does not behave in a standard way. For example, taking the address of a variable with:

addis   rx,r0,object@h
  
ori     rx,rx,objec@l
  

generally can not be converted by the linker to SDA PIC/PID Addressing and the linker will warn us if it finds an occurrence.

The following will work with Absolute Addressing as well as allow the linker to convert the instructions to SDA PIC/PID Addressing:

addis   rx,r0,object@ha
  
addi    rx,rx,objec@l
  

Another possible problem may arise if we put constant initialized pointers into a read-only section, thereby not letting the runtime convert the addresses.