DragonFly BSD
DragonFly commits List (threaded) for 2012-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: csu: Add .note.ABI-tag and .note.GNU-stack

From: John Marino <marino@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 23 Jan 2012 08:15:12 -0800 (PST)

commit f4df877297f500e9a39a8d96275c2520079d6e40
Author: John Marino <draco@marino.st>
Date:   Mon Jan 23 01:21:15 2012 +0100

    csu: Add .note.ABI-tag and .note.GNU-stack
    For all arches except sparc, gcc emits the section directive for the
    following struct with a PROGBITS type.  However, newer versions of binutils
    (after 2.16.90) require the section to be of NOTE type, to guarantee that
    the .note.ABI-tag section correctly ends up in the first page of the final
    Unfortunately, there is no clean way to tell gcc to use another section
    type, so this C file (or the C file that includes it) must be compiled in
    multiple steps:
    - Compile the .c file to a .s file.
    - Edit the .s file to change the 'progbits' type to 'note', for the section
      directive that defines the .note.ABI-tag section.
    - Compile the .s file to an object file.
    These steps are done in the invididual Makefiles for each applicable arch.
    Taken-from: FreeBSD SVN 217375 (13 JAN 2011)
    On i386 crtn.S:
    Keep the stack aligned to a 16 byte boundary when calling init functions
    so that we don't cause a bus error if they start storing SSE math stuff
    on the stack.
    Taken-from: FreeBSD SVN 146369 (19 MAY 2005)

Summary of changes:
 lib/csu/common/crtbrand.c   |   20 ++++++++++++++++++--
 lib/csu/i386/Makefile.csu   |   41 ++++++++++++++++++++++++++++++-----------
 lib/csu/i386/crt1_s.S       |    4 +++-
 lib/csu/i386/crti.S         |    7 +++++--
 lib/csu/i386/crtn.S         |    7 +++++--
 lib/csu/x86_64/Makefile.csu |   35 +++++++++++++++++++++++++++--------
 lib/csu/x86_64/crti.S       |    6 +++---
 lib/csu/x86_64/crtn.S       |    6 +++---
 8 files changed, 94 insertions(+), 32 deletions(-)


DragonFly BSD source repository

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]