Skip to content

Commit

Permalink
mceliece avx consts.S: use .hidden to avoid putting consts in GOT
Browse files Browse the repository at this point in the history
  • Loading branch information
jschanck committed Mar 3, 2021
1 parent cf33cd6 commit 98cc2a5
Show file tree
Hide file tree
Showing 11 changed files with 130 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ if(OQS_USE_OPENSSL)
target_link_libraries(oqs PUBLIC ${OPENSSL_CRYPTO_LIBRARY})
target_include_directories(oqs PUBLIC ${OPENSSL_INCLUDE_DIR})
endif()
if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND OQS_USE_AVX2_INSTRUCTIONS AND OQS_ENABLE_KEM_CLASSIC_MCELIECE)
# hack to enable McEliece' AVX symbols to link on Linux
target_link_options(oqs PRIVATE -Wl,-Bsymbolic)
endif()

set_target_properties(oqs
PROPERTIES
Expand Down
13 changes: 13 additions & 0 deletions src/kem/classic_mceliece/pqclean_mceliece348864_avx/consts.S
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@
.globl PQCLEAN_MCELIECE348864_AVX_MASK5_0
.globl PQCLEAN_MCELIECE348864_AVX_MASK5_1

.hidden PQCLEAN_MCELIECE348864_AVX_MASK0_0
.hidden PQCLEAN_MCELIECE348864_AVX_MASK0_1
.hidden PQCLEAN_MCELIECE348864_AVX_MASK1_0
.hidden PQCLEAN_MCELIECE348864_AVX_MASK1_1
.hidden PQCLEAN_MCELIECE348864_AVX_MASK2_0
.hidden PQCLEAN_MCELIECE348864_AVX_MASK2_1
.hidden PQCLEAN_MCELIECE348864_AVX_MASK3_0
.hidden PQCLEAN_MCELIECE348864_AVX_MASK3_1
.hidden PQCLEAN_MCELIECE348864_AVX_MASK4_0
.hidden PQCLEAN_MCELIECE348864_AVX_MASK4_1
.hidden PQCLEAN_MCELIECE348864_AVX_MASK5_0
.hidden PQCLEAN_MCELIECE348864_AVX_MASK5_1

.p2align 5

PQCLEAN_MCELIECE348864_AVX_MASK0_0: .quad 0x5555555555555555, 0x5555555555555555, 0x5555555555555555, 0x5555555555555555
Expand Down
13 changes: 13 additions & 0 deletions src/kem/classic_mceliece/pqclean_mceliece348864f_avx/consts.S
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@
.globl PQCLEAN_MCELIECE348864F_AVX_MASK5_0
.globl PQCLEAN_MCELIECE348864F_AVX_MASK5_1

.hidden PQCLEAN_MCELIECE348864F_AVX_MASK0_0
.hidden PQCLEAN_MCELIECE348864F_AVX_MASK0_1
.hidden PQCLEAN_MCELIECE348864F_AVX_MASK1_0
.hidden PQCLEAN_MCELIECE348864F_AVX_MASK1_1
.hidden PQCLEAN_MCELIECE348864F_AVX_MASK2_0
.hidden PQCLEAN_MCELIECE348864F_AVX_MASK2_1
.hidden PQCLEAN_MCELIECE348864F_AVX_MASK3_0
.hidden PQCLEAN_MCELIECE348864F_AVX_MASK3_1
.hidden PQCLEAN_MCELIECE348864F_AVX_MASK4_0
.hidden PQCLEAN_MCELIECE348864F_AVX_MASK4_1
.hidden PQCLEAN_MCELIECE348864F_AVX_MASK5_0
.hidden PQCLEAN_MCELIECE348864F_AVX_MASK5_1

.p2align 5

PQCLEAN_MCELIECE348864F_AVX_MASK0_0: .quad 0x5555555555555555, 0x5555555555555555, 0x5555555555555555, 0x5555555555555555
Expand Down
13 changes: 13 additions & 0 deletions src/kem/classic_mceliece/pqclean_mceliece460896_avx/consts.S
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@
.globl PQCLEAN_MCELIECE460896_AVX_MASK5_0
.globl PQCLEAN_MCELIECE460896_AVX_MASK5_1

.hidden PQCLEAN_MCELIECE460896_AVX_MASK0_0
.hidden PQCLEAN_MCELIECE460896_AVX_MASK0_1
.hidden PQCLEAN_MCELIECE460896_AVX_MASK1_0
.hidden PQCLEAN_MCELIECE460896_AVX_MASK1_1
.hidden PQCLEAN_MCELIECE460896_AVX_MASK2_0
.hidden PQCLEAN_MCELIECE460896_AVX_MASK2_1
.hidden PQCLEAN_MCELIECE460896_AVX_MASK3_0
.hidden PQCLEAN_MCELIECE460896_AVX_MASK3_1
.hidden PQCLEAN_MCELIECE460896_AVX_MASK4_0
.hidden PQCLEAN_MCELIECE460896_AVX_MASK4_1
.hidden PQCLEAN_MCELIECE460896_AVX_MASK5_0
.hidden PQCLEAN_MCELIECE460896_AVX_MASK5_1

.p2align 5

PQCLEAN_MCELIECE460896_AVX_MASK0_0: .quad 0x5555555555555555, 0x5555555555555555, 0x5555555555555555, 0x5555555555555555
Expand Down
13 changes: 13 additions & 0 deletions src/kem/classic_mceliece/pqclean_mceliece460896f_avx/consts.S
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@
.globl PQCLEAN_MCELIECE460896F_AVX_MASK5_0
.globl PQCLEAN_MCELIECE460896F_AVX_MASK5_1

.hidden PQCLEAN_MCELIECE460896F_AVX_MASK0_0
.hidden PQCLEAN_MCELIECE460896F_AVX_MASK0_1
.hidden PQCLEAN_MCELIECE460896F_AVX_MASK1_0
.hidden PQCLEAN_MCELIECE460896F_AVX_MASK1_1
.hidden PQCLEAN_MCELIECE460896F_AVX_MASK2_0
.hidden PQCLEAN_MCELIECE460896F_AVX_MASK2_1
.hidden PQCLEAN_MCELIECE460896F_AVX_MASK3_0
.hidden PQCLEAN_MCELIECE460896F_AVX_MASK3_1
.hidden PQCLEAN_MCELIECE460896F_AVX_MASK4_0
.hidden PQCLEAN_MCELIECE460896F_AVX_MASK4_1
.hidden PQCLEAN_MCELIECE460896F_AVX_MASK5_0
.hidden PQCLEAN_MCELIECE460896F_AVX_MASK5_1

.p2align 5

PQCLEAN_MCELIECE460896F_AVX_MASK0_0: .quad 0x5555555555555555, 0x5555555555555555, 0x5555555555555555, 0x5555555555555555
Expand Down
13 changes: 13 additions & 0 deletions src/kem/classic_mceliece/pqclean_mceliece6688128_avx/consts.S
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@
.globl PQCLEAN_MCELIECE6688128_AVX_MASK5_0
.globl PQCLEAN_MCELIECE6688128_AVX_MASK5_1

.hidden PQCLEAN_MCELIECE6688128_AVX_MASK0_0
.hidden PQCLEAN_MCELIECE6688128_AVX_MASK0_1
.hidden PQCLEAN_MCELIECE6688128_AVX_MASK1_0
.hidden PQCLEAN_MCELIECE6688128_AVX_MASK1_1
.hidden PQCLEAN_MCELIECE6688128_AVX_MASK2_0
.hidden PQCLEAN_MCELIECE6688128_AVX_MASK2_1
.hidden PQCLEAN_MCELIECE6688128_AVX_MASK3_0
.hidden PQCLEAN_MCELIECE6688128_AVX_MASK3_1
.hidden PQCLEAN_MCELIECE6688128_AVX_MASK4_0
.hidden PQCLEAN_MCELIECE6688128_AVX_MASK4_1
.hidden PQCLEAN_MCELIECE6688128_AVX_MASK5_0
.hidden PQCLEAN_MCELIECE6688128_AVX_MASK5_1

.p2align 5

PQCLEAN_MCELIECE6688128_AVX_MASK0_0: .quad 0x5555555555555555, 0x5555555555555555, 0x5555555555555555, 0x5555555555555555
Expand Down
13 changes: 13 additions & 0 deletions src/kem/classic_mceliece/pqclean_mceliece6688128f_avx/consts.S
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@
.globl PQCLEAN_MCELIECE6688128F_AVX_MASK5_0
.globl PQCLEAN_MCELIECE6688128F_AVX_MASK5_1

.hidden PQCLEAN_MCELIECE6688128F_AVX_MASK0_0
.hidden PQCLEAN_MCELIECE6688128F_AVX_MASK0_1
.hidden PQCLEAN_MCELIECE6688128F_AVX_MASK1_0
.hidden PQCLEAN_MCELIECE6688128F_AVX_MASK1_1
.hidden PQCLEAN_MCELIECE6688128F_AVX_MASK2_0
.hidden PQCLEAN_MCELIECE6688128F_AVX_MASK2_1
.hidden PQCLEAN_MCELIECE6688128F_AVX_MASK3_0
.hidden PQCLEAN_MCELIECE6688128F_AVX_MASK3_1
.hidden PQCLEAN_MCELIECE6688128F_AVX_MASK4_0
.hidden PQCLEAN_MCELIECE6688128F_AVX_MASK4_1
.hidden PQCLEAN_MCELIECE6688128F_AVX_MASK5_0
.hidden PQCLEAN_MCELIECE6688128F_AVX_MASK5_1

.p2align 5

PQCLEAN_MCELIECE6688128F_AVX_MASK0_0: .quad 0x5555555555555555, 0x5555555555555555, 0x5555555555555555, 0x5555555555555555
Expand Down
13 changes: 13 additions & 0 deletions src/kem/classic_mceliece/pqclean_mceliece6960119_avx/consts.S
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@
.globl PQCLEAN_MCELIECE6960119_AVX_MASK5_0
.globl PQCLEAN_MCELIECE6960119_AVX_MASK5_1

.hidden PQCLEAN_MCELIECE6960119_AVX_MASK0_0
.hidden PQCLEAN_MCELIECE6960119_AVX_MASK0_1
.hidden PQCLEAN_MCELIECE6960119_AVX_MASK1_0
.hidden PQCLEAN_MCELIECE6960119_AVX_MASK1_1
.hidden PQCLEAN_MCELIECE6960119_AVX_MASK2_0
.hidden PQCLEAN_MCELIECE6960119_AVX_MASK2_1
.hidden PQCLEAN_MCELIECE6960119_AVX_MASK3_0
.hidden PQCLEAN_MCELIECE6960119_AVX_MASK3_1
.hidden PQCLEAN_MCELIECE6960119_AVX_MASK4_0
.hidden PQCLEAN_MCELIECE6960119_AVX_MASK4_1
.hidden PQCLEAN_MCELIECE6960119_AVX_MASK5_0
.hidden PQCLEAN_MCELIECE6960119_AVX_MASK5_1

.p2align 5

PQCLEAN_MCELIECE6960119_AVX_MASK0_0: .quad 0x5555555555555555, 0x5555555555555555, 0x5555555555555555, 0x5555555555555555
Expand Down
13 changes: 13 additions & 0 deletions src/kem/classic_mceliece/pqclean_mceliece6960119f_avx/consts.S
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@
.globl PQCLEAN_MCELIECE6960119F_AVX_MASK5_0
.globl PQCLEAN_MCELIECE6960119F_AVX_MASK5_1

.hidden PQCLEAN_MCELIECE6960119F_AVX_MASK0_0
.hidden PQCLEAN_MCELIECE6960119F_AVX_MASK0_1
.hidden PQCLEAN_MCELIECE6960119F_AVX_MASK1_0
.hidden PQCLEAN_MCELIECE6960119F_AVX_MASK1_1
.hidden PQCLEAN_MCELIECE6960119F_AVX_MASK2_0
.hidden PQCLEAN_MCELIECE6960119F_AVX_MASK2_1
.hidden PQCLEAN_MCELIECE6960119F_AVX_MASK3_0
.hidden PQCLEAN_MCELIECE6960119F_AVX_MASK3_1
.hidden PQCLEAN_MCELIECE6960119F_AVX_MASK4_0
.hidden PQCLEAN_MCELIECE6960119F_AVX_MASK4_1
.hidden PQCLEAN_MCELIECE6960119F_AVX_MASK5_0
.hidden PQCLEAN_MCELIECE6960119F_AVX_MASK5_1

.p2align 5

PQCLEAN_MCELIECE6960119F_AVX_MASK0_0: .quad 0x5555555555555555, 0x5555555555555555, 0x5555555555555555, 0x5555555555555555
Expand Down
13 changes: 13 additions & 0 deletions src/kem/classic_mceliece/pqclean_mceliece8192128_avx/consts.S
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@
.globl PQCLEAN_MCELIECE8192128_AVX_MASK5_0
.globl PQCLEAN_MCELIECE8192128_AVX_MASK5_1

.hidden PQCLEAN_MCELIECE8192128_AVX_MASK0_0
.hidden PQCLEAN_MCELIECE8192128_AVX_MASK0_1
.hidden PQCLEAN_MCELIECE8192128_AVX_MASK1_0
.hidden PQCLEAN_MCELIECE8192128_AVX_MASK1_1
.hidden PQCLEAN_MCELIECE8192128_AVX_MASK2_0
.hidden PQCLEAN_MCELIECE8192128_AVX_MASK2_1
.hidden PQCLEAN_MCELIECE8192128_AVX_MASK3_0
.hidden PQCLEAN_MCELIECE8192128_AVX_MASK3_1
.hidden PQCLEAN_MCELIECE8192128_AVX_MASK4_0
.hidden PQCLEAN_MCELIECE8192128_AVX_MASK4_1
.hidden PQCLEAN_MCELIECE8192128_AVX_MASK5_0
.hidden PQCLEAN_MCELIECE8192128_AVX_MASK5_1

.p2align 5

PQCLEAN_MCELIECE8192128_AVX_MASK0_0: .quad 0x5555555555555555, 0x5555555555555555, 0x5555555555555555, 0x5555555555555555
Expand Down
13 changes: 13 additions & 0 deletions src/kem/classic_mceliece/pqclean_mceliece8192128f_avx/consts.S
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@
.globl PQCLEAN_MCELIECE8192128F_AVX_MASK5_0
.globl PQCLEAN_MCELIECE8192128F_AVX_MASK5_1

.hidden PQCLEAN_MCELIECE8192128F_AVX_MASK0_0
.hidden PQCLEAN_MCELIECE8192128F_AVX_MASK0_1
.hidden PQCLEAN_MCELIECE8192128F_AVX_MASK1_0
.hidden PQCLEAN_MCELIECE8192128F_AVX_MASK1_1
.hidden PQCLEAN_MCELIECE8192128F_AVX_MASK2_0
.hidden PQCLEAN_MCELIECE8192128F_AVX_MASK2_1
.hidden PQCLEAN_MCELIECE8192128F_AVX_MASK3_0
.hidden PQCLEAN_MCELIECE8192128F_AVX_MASK3_1
.hidden PQCLEAN_MCELIECE8192128F_AVX_MASK4_0
.hidden PQCLEAN_MCELIECE8192128F_AVX_MASK4_1
.hidden PQCLEAN_MCELIECE8192128F_AVX_MASK5_0
.hidden PQCLEAN_MCELIECE8192128F_AVX_MASK5_1

.p2align 5

PQCLEAN_MCELIECE8192128F_AVX_MASK0_0: .quad 0x5555555555555555, 0x5555555555555555, 0x5555555555555555, 0x5555555555555555
Expand Down

0 comments on commit 98cc2a5

Please sign in to comment.