LD data reordering
LD data reordering
- Subject: LD data reordering
- From: Jonas Maebe <email@hidden>
- Date: Sat, 5 Sep 2009 11:18:02 +0200
Hello,
LD's new data reordering feature also turns out to break one of our
compiler's features. In this case it's not because the reordering is
buggy (as with the code reordering), but due to a plain incompatibility.
We have support for so-called "resource strings". Per unit, these are
laid out as follows
.data
global_unitx_start_label:
[metadata]
global_string1_label:
[string 1 data]
global_string2_label:
[string 2 data]
global_unitx_end_label:
The main program contains an array of the start and end labels of all
resource strings in all units:
.globl FPC_RESOURCESTRINGTABLES
FPC_RESOURCESTRINGTABLES:
.long 1 // number of start/end pairs
.long global_unitx_start_label
.long global_unitx_end_label
These are then used to initialise/finalise run time resource string
tables.
The reasons for doing it like that are that
a) the individual resource strings can easily be accessed from
anywhere by simply using the global symbol
b) dead code/data stripping can strip away unused resource strings
Now, when LD starts moving the resource string data from between the
start and end labels (or worse, the start and end labels themselves),
things obviously break down horribly.
My questions:
a) are there ways to annotate the assembler code to indicate to LD
that it must not move around certain labels/data? (similar to how such
directives were added for dead code stripping) The assembler reference
manual hasn't been updated since January 2009, so it cannot yet
mention anything about this. The release notes also appear to be
silent on this topic (and I can't find the ld release notes for Xcode
3.2, and the ones from 3.1 also seem to have disappeared).
b) if a) is possible, is it possible to do so in a way that does not
break when assembling using an assembler from a previous version of
Xcode? (using some kind of assembler ifdef-equivalent)
Thanks,
Jonas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden