diff options
| author | miod <> | 2023-01-13 17:11:41 +0000 |
|---|---|---|
| committer | miod <> | 2023-01-13 17:11:41 +0000 |
| commit | 6f56f28c72618c1e8d79d943e58f0f1c66e73832 (patch) | |
| tree | 754902f7e6ad288b35b04ef817ed997460a00546 /src/lib/libcrypto/rc4 | |
| parent | 38ed78ca28e1e252895ca064c8388657440e5142 (diff) | |
| download | openbsd-6f56f28c72618c1e8d79d943e58f0f1c66e73832.tar.gz openbsd-6f56f28c72618c1e8d79d943e58f0f1c66e73832.tar.bz2 openbsd-6f56f28c72618c1e8d79d943e58f0f1c66e73832.zip | |
Move all data tables from .text section to .rodata, and update the code to
fetch them correctly when building PIC. Also drop unused data, and remove
--no-execute-only from linker flags.
ok jsing@ kettenis@
Diffstat (limited to 'src/lib/libcrypto/rc4')
| -rw-r--r-- | src/lib/libcrypto/rc4/asm/rc4-parisc.pl | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/lib/libcrypto/rc4/asm/rc4-parisc.pl b/src/lib/libcrypto/rc4/asm/rc4-parisc.pl index 7e7974430a..24e3e0c30b 100644 --- a/src/lib/libcrypto/rc4/asm/rc4-parisc.pl +++ b/src/lib/libcrypto/rc4/asm/rc4-parisc.pl | |||
| @@ -137,12 +137,7 @@ ___ | |||
| 137 | 137 | ||
| 138 | $code=<<___; | 138 | $code=<<___; |
| 139 | .LEVEL $LEVEL | 139 | .LEVEL $LEVEL |
| 140 | #if 0 | ||
| 141 | .SPACE \$TEXT\$ | ||
| 142 | .SUBSPA \$CODE\$,QUAD=0,ALIGN=8,ACCESS=0x2C,CODE_ONLY | ||
| 143 | #else | ||
| 144 | .text | 140 | .text |
| 145 | #endif | ||
| 146 | 141 | ||
| 147 | .EXPORT RC4,ENTRY,ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR | 142 | .EXPORT RC4,ENTRY,ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR |
| 148 | RC4 | 143 | RC4 |
| @@ -297,20 +292,22 @@ RC4_options | |||
| 297 | .PROC | 292 | .PROC |
| 298 | .CALLINFO NO_CALLS | 293 | .CALLINFO NO_CALLS |
| 299 | .ENTRY | 294 | .ENTRY |
| 300 | blr %r0,%r28 | 295 | #ifdef __PIC__ |
| 301 | ldi 3,%r1 | 296 | addil LT'L\$opts, %r19 |
| 302 | L\$pic | 297 | ldw RT'L\$opts(%r1), %r28 |
| 303 | andcm %r28,%r1,%r28 | 298 | #else |
| 299 | ldil L'L\$opts, %t1 | ||
| 300 | ldo R'L\$opts(%t1), %r28 | ||
| 301 | #endif | ||
| 304 | bv (%r2) | 302 | bv (%r2) |
| 305 | .EXIT | 303 | .EXIT |
| 306 | ldo L\$opts-L\$pic(%r28),%r28 | 304 | nop |
| 307 | .PROCEND | 305 | .PROCEND |
| 308 | 306 | ||
| 309 | .data | 307 | .section .rodata |
| 310 | .ALIGN 8 | 308 | .ALIGN 8 |
| 311 | L\$opts | 309 | L\$opts |
| 312 | .STRINGZ "rc4(4x,`$SZ==1?"char":"int"`)" | 310 | .STRINGZ "rc4(4x,`$SZ==1?"char":"int"`)" |
| 313 | .STRINGZ "RC4 for PA-RISC, CRYPTOGAMS by <appro\@openssl.org>" | ||
| 314 | ___ | 311 | ___ |
| 315 | $code =~ s/\`([^\`]*)\`/eval $1/gem; | 312 | $code =~ s/\`([^\`]*)\`/eval $1/gem; |
| 316 | $code =~ s/cmpib,\*/comib,/gm if ($SIZE_T==4); | 313 | $code =~ s/cmpib,\*/comib,/gm if ($SIZE_T==4); |
