linking and symbol placement

tns1 <[email protected]> Fri, 19 Sep 2008 19:29:31 -0700
Newsgroups gmane.comp.gnu.utils
Organization Cox
Message-ID <[email protected]>
I am porting some older gnu makefiles and linker scripts to a newer 
version of GCC. I have one linker script that I don't see how to update.

SECTIONS
{
    GROUP :
    {
     COMMON :
     {
      a.o
      b.o
      c.o
     }
    }
}


This generated a segfault until I removed the GROUP : { } encapsulation. 
It links, but the order in which the symbols appear in the map is not 
what I expect, and not the same as under the older tool.

Under the older tool, like items (data for instance) seem to appear in 
the same order in which they are defined in the source files, and the 
same order the source files appear in the script. Under the new tool the 
symbols still end up in the same section, but the assignment is not very 
orderly. I am wondering if this is because the GROUP command is no 
longer supported, or perhaps the new tool is using different metrics 
(minimize distance?) to place items in memory.