[lkml]   [2000]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] removal of "static foo = 0"
    Adam J. Richter wrote:
    > At the moment, I have started daydreaming about instead
    > writing an "elf squeezer" to do this and other space optimizations
    > by modifying objdump.

    Hmm, this would require that gcc never calculates the location of an
    explicitly initialized static variable based on the address of another
    one. E.g. in

    static int a = 0, b = 0, c = 0, d = 0;

    ... a+b+c+d ...

    egcs-2.91.66 indeed doesn't seem to make this optimization on i386.
    (Maybe the pointer increment or pointer offset solution would
    actually be slower - didn't check.) But I'm not sure if this is also
    true for other versions/architectures, or other code constructs.

    - Werner

    / Werner Almesberger, ICA, EPFL, CH /
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 12:47    [W:0.020 / U:77.416 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site