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 am not familiar with the GNU assembler syntax as I use the ARM tools. However, based on the ARM syntax it looks what you are doing is getting the address of the label. Have you tried:.extern mainldr pc, =main
.extern mainldr pc, =main