This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: section placement q


On Thu, May 25, 2000 at 07:09:18PM +0200, Jamie Lokier wrote:
> A much more thorough approach, without the danger and still with
> sharing, is to have the linker optimise, à la -ffunction-sections
> -fdata-sections.  But extend the linker's gc-sections to do something
> like: put section .S in .init.S unless anybody from outside .init*
> references the section.

Putting this kind of policy in the linker proper would be silly.
You're talking about exactly one application that wants this sort
of .init behaviour.

It wouldn't be too hard, however, to build a tool that examined
object files and generated a link script to do exactly what you want.


r~

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]