Hi, On Tue, Apr 5, 2011 at 11:34 AM, Jeff Law <law@xxxxxxxxxx> wrote: > > On 04/04/11 14:19, kevin diggs wrote: >> On Mon, Apr 4, 2011 at 2:16 PM, Jeff Law <law@xxxxxxxxxx> wrote: >>> -----BEGIN PGP SIGNED MESSAGE----- >>> Hash: SHA1 >>> >>> On 04/04/11 12:31, kevin diggs wrote: > The trick here is you really need to build an aggregate of the objects > rather than assuming you can reference different objects from a single > base pointer and different offsets. The assumptions for the latter > often break. > I am going to plead complete confusion here? Would an example of an example of "build an aggregate of the objects" be to pack them into a structure? The assumption this optimization makes is that the constant strings do NOT move RELATIVE to one another. Are there ... reasons or ... code manipulation techniques that will rearrange these post assembly? And if so, are they commonly used? I understand that -fwriteable-strings (or whatever it is called) will probably throw a monkey wrench into things. As would something like sticking strings into different sections (I am assuming that the section attribute can be applied to string literals - There is an attribute to control what section something goes in, right?). > Alternately, you can do this with a combination of compiler & linker > support. It's been done many times through the years on a variety of > architectures. > > Jeff > As always, thanks for taking the time to reply! kevin P.S.: Anybody have enough of an idea of what I am trying to do to suggest some sample (3.4.6acene era) optimizations to look at? Both a tree based and RTL example (i.e. two different examples, not one that is both).