separate assembly
Matthew Fluet
fluet@research.nj.nec.com
Sat, 12 Aug 2000 13:27:27 -0400 (EDT)
> Hmmm. I would like to understand an example of what other labels need to be
> global. I would think that gcReturns and entries is enough. Can you send
> a CPS program and chunkification that causes problems?
It has nothing to do with the CPS or chunkification. Its simply a product
of the fact that the way I'm producing separate files is that I keep
dumping blocks until I hit more than 100000 assembly statements, then I
start dumping blocks into another file. (Read: no analysis of the
assembly whatsoever is done.) So, there is nothing that prevents
something like:
A: ...
jae B
jmp C
# SPLIT
B: ...
...
C: ...
Where B, C labels that were "local" to the chunk. Previously, there was
no reason to make B, C globals, since their only reference was in the same
assembly file. But now that reference got split to another file, so they
need to be global.
> The fact that the linker doesn't have the capability to link some .o
> files together and then hide (and also rename) entries is a real pain,
> but doesn't look like it is going to be fixed (despite the fact that the
> implementation is trivial).
This would really be the best solution. Sort of mark everything that
didn't need to be truly global as "global for one link" and then
they would go away after the link.
> Hmmm, could the patch happen after linking with the C stub? Then nothing is
> global other than the library routines.
I was looking that the "strip" program as one way of patching the object,
but it didn't seem to have the right ammount of fine-tuning that would be
required.