This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hello! I have a need for using .cfi_sections in glibc code. .cfi_sections is a recent addition to binutils' as, done by Jakub on 2009-10-02. 2009-12-08 Thomas Schwinge <thomas@codesourcery.com> * configure.in (libc_cv_asm_cfi_directive_sections): New test. (HAVE_ASM_CFI_DIRECTIVE_SECTIONS): Set depending on its outcome. * sysdeps/generic/sysdep.h (cfi_sections, CFI_SECTIONS): Define accordingly. Index: configure.in =================================================================== --- configure.in (revision 9348) +++ configure.in (working copy) @@ -1951,6 +1951,24 @@ rm -f conftest*]) if test $libc_cv_asm_cfi_directives = yes; then AC_DEFINE(HAVE_ASM_CFI_DIRECTIVES) + + AC_CACHE_CHECK([whether the CFI directive .cfi_sections is supported], + [libc_cv_asm_cfi_directive_sections], + [cat > conftest.s <<EOF + .text + .cfi_sections .debug_frame, .eh_frame + .cfi_startproc + .cfi_endproc +EOF + if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then + libc_cv_asm_cfi_directive_sections=yes + else + libc_cv_asm_cfi_directive_sections=no + fi + rm -f conftest*]) + if test $libc_cv_asm_cfi_directive_sections = yes; then + AC_DEFINE(HAVE_ASM_CFI_DIRECTIVE_SECTIONS) + fi fi AC_CACHE_CHECK(for ld --no-whole-archive, libc_cv_ld_no_whole_archive, [dnl Index: sysdeps/generic/sysdep.h =================================================================== --- sysdeps/generic/sysdep.h (revision 9348) +++ sysdeps/generic/sysdep.h (working copy) @@ -88,6 +88,12 @@ # define cfi_lsda(enc, exp) # endif +# ifdef HAVE_ASM_CFI_DIRECTIVE_SECTIONS +# define cfi_sections(sections_list...) .cfi_sections sections_list +# else +# define cfi_sections(sections_list...) +# endif + #else /* ! ASSEMBLER */ # ifdef HAVE_ASM_CFI_DIRECTIVES # define CFI_STRINGIFY(Name) CFI_STRINGIFY2 (Name) @@ -144,6 +150,12 @@ # define CFI_LSDA(enc, exp) # endif +# ifdef HAVE_ASM_CFI_DIRECTIVE_SECTIONS +# define CFI_SECTIONS(sections_list...) ".cfi_sections " #sections_list +# else +# define CFI_SECTIONS(sections_list...) +# endif + #endif /* __ASSEMBLER__ */ /* Values used for encoding parameter of cfi_personality and cfi_lsda. */ Regards, Thomas
Attachment:
pgp00000.pgp
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |