summaryrefslogtreecommitdiff
Diffstat
-rw-r--r--config.h1
-rwxr-xr-xconfigure2
-rw-r--r--libavcodec/arm/fft_fixed_neon.S2
-rw-r--r--libavcodec/arm/fft_neon.S2
-rw-r--r--libavutil/arm/asm.S6
5 files changed, 10 insertions, 3 deletions
diff --git a/config.h b/config.h
index 085588f..abe0d98 100644
--- a/config.h
+++ b/config.h
@@ -258,6 +258,7 @@
#define HAVE_SARESTART 1
#define HAVE_SCHED_GETAFFINITY 0
#define HAVE_SDL 0
+#define HAVE_SECTION_DATA_REL_RO 1
#define HAVE_SETCONSOLETEXTATTRIBUTE 0
#define HAVE_SETMODE 0
#define HAVE_SETRLIMIT 1
diff --git a/configure b/configure
index af322f5..25d58da 100755
--- a/configure
+++ b/configure
@@ -1514,6 +1514,7 @@ HAVE_LIST="
sarestart
sched_getaffinity
sdl
+ section_data_rel_ro
SetConsoleTextAttribute
setmode
setrlimit
@@ -3635,6 +3636,7 @@ case $target_os in
add_cppflags -U__STRICT_ANSI__
;;
linux)
+ enable section_data_rel_ro
enable dv1394
;;
irix*)
diff --git a/libavcodec/arm/fft_fixed_neon.S b/libavcodec/arm/fft_fixed_neon.S
index d4a38a2..c0a14a0 100644
--- a/libavcodec/arm/fft_fixed_neon.S
+++ b/libavcodec/arm/fft_fixed_neon.S
@@ -242,7 +242,7 @@ function ff_fft_fixed_calc_neon, export=1
bx r3
endfunc
-const fft_fixed_tab_neon
+const fft_fixed_tab_neon, relocate=1
.word fft4_neon
.word fft8_neon
.word fft16_neon
diff --git a/libavcodec/arm/fft_neon.S b/libavcodec/arm/fft_neon.S
index 8b9ae2a..48f8dfc 100644
--- a/libavcodec/arm/fft_neon.S
+++ b/libavcodec/arm/fft_neon.S
@@ -348,7 +348,7 @@ function ff_fft_permute_neon, export=1
pop {r4,pc}
endfunc
-const fft_tab_neon
+const fft_tab_neon, relocate=1
.word fft4_neon
.word fft8_neon
.word fft16_neon
diff --git a/libavutil/arm/asm.S b/libavutil/arm/asm.S
index 9cdcce9..2b0d0f6 100644
--- a/libavutil/arm/asm.S
+++ b/libavutil/arm/asm.S
@@ -79,12 +79,16 @@ ELF .type \name, %function
\name:
.endm
-.macro const name, align=2
+.macro const name, align=2, relocate=0
.macro endconst
ELF .size \name, . - \name
.purgem endconst
.endm
+.if HAVE_SECTION_DATA_REL_RO && \relocate
+ .section .data.rel.ro
+.else
.section .rodata
+.endif
.align \align
\name:
.endm