[lkml]   [2011]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 0/2] jump label: update for .39
    On 03/10/2011 10:35 AM, Steven Rostedt wrote:
    > On Thu, 2011-03-10 at 13:20 -0500, Jason Baron wrote:
    >> On Thu, Mar 10, 2011 at 01:04:01PM -0500, Steven Rostedt wrote:
    >> Now its up to the linker to decide where to place that element. Can we
    >>> guarantee that it will always be on an 8 byte boundery?
    >>> Hmm, I wonder if we could add a .ALIGN sizeof(long) before that?
    >> we can. Sparc does it, see: arch/sparc/include/asm/jump_label.h.
    >> So I guess it would be .align 8 for 64-bit and .align 4 for 32-bit...
    > Now what about the vmlinux.ld? That has a align 8. Is that a one time
    > short (align to 8 bytes here), or will it carry through aligning the
    > rest of the section. If not, perhaps we may be OK.

    That is the alignment of the start of the section in the *output*
    object. The linker will respect the requested alignment of the various
    __jump_table sections in the *input* objects. So adding an .align 8
    before emitting data into the __jump_table section would not hurt (It
    could even help.)

    I empirically determined that if no .align is specified, the requested
    alignment defaults to 4 for x86_64.

    The alignment requested by the assembler will have to satisfy *all* the
    requested alignments, so manually forcing everything to .align 8 (or
    .align 4 for 32-bit) should ensure that the linker doesn't put in any holes.

    David Daney

     \ /
      Last update: 2011-03-10 19:49    [W:0.020 / U:10.708 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site