RISC OS Open
Safeguarding the past, present and future of RISC OS for everyone
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

Previous|Next

  • Tickets
  • » Ticket #366

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]

AREA |C$$code|, CODE, READONLY
x$codeseg
DATADCB &62,&61,&72,&00

wibble
LDR a1,[pc, #L000014-.-8]
LDR a2,[sl,#-0]
LDR a1,[a2,a1]
B puts
L000014
DCD foo

AREA |C$$data|,DATA
x$dataseg

foo
DCD |x$codeseg|

EXPORT wibble EXPORT foo IMPORT puts IMPORT |_Mod$Reloc$Off| END

</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

  • Comment on, or change status of, this ticket

Previous|Next

Search tickets

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Options

  • Tickets
  • New ticket
  • Milestones
  • Subversion: Changesets
  • Subversion: Browse
  • CVS: Revisions
  • CVS: Browse
  • Search

RSS feeds Rss

  • Tickets
  • Everything!
  • More feeds...
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Collaboa theme is distantly based on the Collaboa default layout

Valid XHTML 1.0  |  Valid CSS

Powered by Collaboa
This site runs on Rails

Hosted by Arachsys