lkml.org 
[lkml]   [2007]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] [4/4] x86_64: Check for .cfi_rel_offset in CFI probe
    Date

    Very old 64bit binutils have .cfi_startproc/endproc, but
    no .cfi_rel_offset. Check for .cfi_rel_offset too.

    Cc: jbeulich@novell.com
    Cc: sam@ravnborg.org

    Index: linux/arch/x86_64/Makefile
    ===================================================================
    --- linux.orig/arch/x86_64/Makefile
    +++ linux/arch/x86_64/Makefile
    @@ -57,8 +57,8 @@ cflags-y += $(call cc-option,-mno-sse -m
    cflags-y += -maccumulate-outgoing-args

    # do binutils support CFI?
    -cflags-y += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
    -AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
    +cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
    +AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)

    # is .cfi_signal_frame supported too?
    cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
    Index: linux/arch/i386/Makefile
    ===================================================================
    --- linux.orig/arch/i386/Makefile
    +++ linux/arch/i386/Makefile
    @@ -51,8 +51,8 @@ cflags-y += -maccumulate-outgoing-args
    CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;)

    # do binutils support CFI?
    -cflags-y += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
    -AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
    +cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
    +AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)

    # is .cfi_signal_frame supported too?
    cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2007-08-15 02:47    [W:3.311 / U:0.120 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site