Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nettle
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Wim Lewis
nettle
Commits
d56b4410
Commit
d56b4410
authored
Feb 06, 2013
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let configure set ASM_TYPE_PROGBITS, and use it for ASM_MARK_NOEXEC_STACK.
parent
71e778e3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
24 deletions
+37
-24
ChangeLog
ChangeLog
+6
-0
config.m4.in
config.m4.in
+1
-0
configure.ac
configure.ac
+30
-24
No files found.
ChangeLog
View file @
d56b4410
2013-02-06 Niels Möller <nisse@lysator.liu.se>
* config.m4.in: Substitute ASM_TYPE_PROGBITS as TYPE_PROGBITS.
* config.make.in: Added .s to the suffix list.
* Makefile.in (.asm.s): Use a separate make target for .asm
...
...
@@ -11,6 +13,10 @@
(asm.d): Make config.status write dependencies for .s files into
asm.d.
(ASM_ALIGN_LOG): Set to "no" when appropriate.
(ASM_TYPE_FUNCTION): Default to "@function".
(ASM_TYPE_PROGBITS): New substituted variable, set in the same way
as ASM_TYPE_FUNCTION.
(ASM_MARK_NOEXEC_STACK): Use TYPE_PROGBITS.
* asm.m4: Use changecom to disable m4 quoting. Use divert to
suppress output.
...
...
config.m4.in
View file @
d56b4410
...
...
@@ -2,6 +2,7 @@ define(<srcdir>, <<@srcdir@>>)dnl
define(<C_NAME>, <@ASM_SYMBOL_PREFIX@><$1>)dnl
define(<ELF_STYLE>, <@ASM_ELF_STYLE@>)dnl
define(<TYPE_FUNCTION>, <@ASM_TYPE_FUNCTION@>)dnl
define(<TYPE_PROGBITS>, <@ASM_TYPE_PROGBITS@>)dnl
define(<ALIGN_LOG>, <@ASM_ALIGN_LOG@>)dnl
define(<ALIGNOF_UINT64_T>, <@ALIGNOF_UINT64_T@>)dnl
define(<W64_ABI>, <@W64_ABI@>)dnl
...
...
configure.ac
View file @
d56b4410
...
...
@@ -386,7 +386,9 @@ AC_SUBST([CCPIC_MAYBE])
ASM_SYMBOL_PREFIX=''
ASM_ELF_STYLE='no'
ASM_TYPE_FUNCTION=''
# GNU as default is to use @
ASM_TYPE_FUNCTION='@function'
ASM_TYPE_PROGBITS='@progbits'
ASM_MARK_NOEXEC_STACK=''
ASM_ALIGN_LOG=''
...
...
@@ -410,29 +412,6 @@ if test x$enable_assembler = xyes ; then
ASM_SYMBOL_PREFIX='_'
fi
AC_CACHE_CHECK([if we should use a .note.GNU-stack section],
nettle_cv_asm_gnu_stack,
[ # Default
nettle_cv_asm_gnu_stack=no
cat >conftest.c <<EOF
int foo() { return 0; }
EOF
nettle_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >conftest.out 2>&1"
if AC_TRY_EVAL(nettle_compile); then
cat conftest.out >&AC_FD_CC
$OBJDUMP -x conftest.o | grep '\.note\.GNU-stack' > /dev/null \
&& nettle_cv_asm_gnu_stack=yes
else
cat conftest.out >&AC_FD_CC
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.s >&AC_FD_CC
fi
rm -f conftest.*])
if test x$nettle_cv_asm_gnu_stack = xyes ; then
ASM_MARK_NOEXEC_STACK='.section .note.GNU-stack,"",@progbits'
fi
AC_CACHE_CHECK([for ELF-style .type,%function pseudo-ops],
[nettle_cv_asm_type_percent_function],
[GMP_TRY_ASSEMBLE([
...
...
@@ -465,12 +444,38 @@ foo:
if test x$nettle_cv_asm_type_percent_function = xyes ; then
ASM_ELF_STYLE='yes'
ASM_TYPE_FUNCTION='%function'
ASM_TYPE_PROGBITS='%progbits'
else
if test x$nettle_cv_asm_type_hash_function = xyes ; then
ASM_ELF_STYLE='yes'
ASM_TYPE_FUNCTION='#function'
ASM_TYPE_PROGBITS='#progbits'
fi
fi
AC_CACHE_CHECK([if we should use a .note.GNU-stack section],
nettle_cv_asm_gnu_stack,
[ # Default
nettle_cv_asm_gnu_stack=no
cat >conftest.c <<EOF
int foo() { return 0; }
EOF
nettle_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >conftest.out 2>&1"
if AC_TRY_EVAL(nettle_compile); then
cat conftest.out >&AC_FD_CC
$OBJDUMP -x conftest.o | grep '\.note\.GNU-stack' > /dev/null \
&& nettle_cv_asm_gnu_stack=yes
else
cat conftest.out >&AC_FD_CC
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.s >&AC_FD_CC
fi
rm -f conftest.*])
if test x$nettle_cv_asm_gnu_stack = xyes ; then
ASM_MARK_NOEXEC_STACK='.section .note.GNU-stack,"",TYPE_PROGBITS'
fi
AC_CACHE_CHECK([if .align assembly directive is logarithmic],
[nettle_cv_asm_align_log],
[GMP_TRY_ASSEMBLE([
...
...
@@ -484,6 +489,7 @@ fi
AC_SUBST(ASM_SYMBOL_PREFIX)
AC_SUBST(ASM_ELF_STYLE)
AC_SUBST(ASM_TYPE_FUNCTION)
AC_SUBST(ASM_TYPE_PROGBITS)
AC_SUBST(ASM_MARK_NOEXEC_STACK)
AC_SUBST(ASM_ALIGN_LOG)
AC_SUBST(W64_ABI)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment