Toolchain: ARM Optimizing C/C++ Compiler v5.1.1
Hello,
I am getting a weird link when I introduce symbol hiding to my code. When I compile a partial out file, link it to an object, and run it, the code runs fine. When I turn on --hide=* on the partial file (with everything else unchanged), link, and run it, it does not function.
Our code needs to be packaged as a partial out file and sent to a 3rd party supplier (who is also our competitor) for them to integrate a part of the code. I have been able to turn on symbol hiding (with --hide/--unhide) to block off as much as possible.
Details to help troubleshoot:
1) The partial files have the same layout hidden or unhidden. I was able to verify this with the map file (both have identical Section Allocation maps, the first difference in the map files are in the Global Symbols section).
2) The final links have the same layout. (same verification as above)
3) The object it links against is the same for both runs.
4) I ran a compare between the final S37 files and there are 266 different sections. I did disassemble the code, and this is the first difference I found.
Corresponding Assembly from listing file
13872 000006de 1EA8 SUBS A1, V2, #2 ; [DPU_4_PIPE0] |2275| ; [ORIG 16-BIT INS]
13873 000006e0 B2C7 UXTB V4, A1 ; [DPU_4_PIPE0] |2275| ; [ORIG 16-BIT INS]
13894 000006e2 F7FFFFFE! BL SuspendOSCpuInterrupts ; [DPU_4_PIPE1] |2282| ; [KEEP 32-BIT INS]
To verify that they both branch to the same function, I added a --unhide=SuspendOSCpuInterrupts and read the map file.
5) I had to add --trampolines=off to help make this easier to diagnose (was 1243 difference sections). If on, normal has 5 trampolines (14 calls), and hide has 2 trampolines (6 calls).
Any suggestions on a next step of investigation? I'm stumped now.