Ticket #366 (Fixed)Sat Nov 30 14:48:06 UTC 2013
Norcroft 5.69 doesn't show module relocation offsets correctly in assembler output
Reported by: | Jeffrey Lee (213) | Severity: | Normal |
Part: | RISC OS: C/C++ toolchain | Release: | |
Milestone: | Status | Fixed |
Details by Jeffrey Lee (213):
When generating module code and asked to produce assembler output, the output file will IMPORT the _Mod$Reloc$Off symbol but not actually use it anywhere. For example, given the following input:
<pre>
#include <stdio.h>
const char *foo[] =
{
“bar”
};
void wibble (void)
{
puts (foo0);
}
</pre>
and compiled with “cc -s -zM -c test.c -o test.s” we get the following output:
<pre>
; generated by Norcroft RISC OS ARM C vsn 5.69 [27 Mar 2011]
x$codeseg |
wibble
LDR a1,[pc, #L000014-.-8]
LDR a2,[sl,#-0]
LDR a1,[a2,a1]
B puts
L000014
DCD foo
x$dataseg |
foo
DCD |x$codeseg|
</pre>
The sl-relative LDR should really appear as “LDR a2,[sl,#-|_Mod$Reloc$Off|]” but instead we just get “LDR a2,[sl,#-0]”
Changelog:
Modified by Jeffrey Lee (213) Sun, November 12 2017 - 21:15:07 GMT
- Status changed from Open to Fixed
Fixed with cc 5.75 / DDE 28