Simon (talking about using -ffunction-sections)
And there's bound to be some
complication due to the assumptions we make in the RTS about the
relative ordering of code/data.
Sounds like the mangler should do the function section magic.
Assuming the mangler understands where section boundaries can
and cannot go (I think this is true), this should be quite easy.
If you run this:
$ cat /tmp/tst.c
int f(int x) {return x;}
int g(int x) {return x;}
$ gcc -ffunction-sections -o - -S /tmp/tst.c
You'll see that the -ffunction-sections flag causes gcc to output these
section directives before the code implementing f and g.
.section.text.f,ax,@progbits
.section.text.g,ax,@progbits
The corresponding GNU linker magic constructs the .text segment out of
all the .text.* segments.
--
Alastair Reid[EMAIL PROTECTED]http://www.cs.utah.edu/~reid/
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users