Mail Archives: pgcc/2000/01/30/16:57:32
On Sun, Jan 30, 2000 at 12:01:38AM -0400, peter AT Cordes DOT Phys DOT Dal DOT Ca wrote:
> Is it possible for gcc to look for gaps to put short strings into?
No, thats what the linker has to do. AFAIK gnuld does not have an option
to sort the data (and doing that actually breaks "common unix sense", such
as used in emacs). gnuld can do it for common symbols, though.
gcc can put each data declaration into it's own sections.
> a function along the the next alignment boundary is wasted. I'm saying gcc
> should see if there are any strings which will fit in that space.)
gcc really does not know how large a function is. its a linker issue (which
is outside of gccs control).
> For the string optimization, it would be really good to be able to do
> cross-file optimization, because then the short strings could all find
Yeah ;-> Could be solved in the linker.
Maybe it's time for "pld" ;)
> homes... OTOH, putting a string right after the ret from a function which
Many cpus penalize this kind o construct. It would be easy to add a -mrodata
switch (like it already exists for the ARC) to select behaviour.
> assumed to use it) makes a _lot_ of sense (to me...). Such strings should
It may make a lot of sense if your goal is space. But when you want
alignment you want alignment, and then packing is not always useful..
--
-----==- |
----==-- _ |
---==---(_)__ __ ____ __ Marc Lehmann +--
--==---/ / _ \/ // /\ \/ / pcg AT opengroup DOT org |e|
-=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE --+
The choice of a GNU generation |
|
- Raw text -