]> git.ipfire.org Git - thirdparty/openssl.git/commit
extend x86_64-xlate.pl perlasm so it can handle .rodata sections properly
authorAlexandr Nedvedicky <sashan@openssl.org>
Thu, 11 Apr 2024 07:06:47 +0000 (09:06 +0200)
committerTomas Mraz <tomas@openssl.org>
Wed, 17 Apr 2024 07:33:57 +0000 (09:33 +0200)
commitfc807a0349bbddb00273465097177025d9b4e25e
tree15888f716d5602b6571a90775c7ea9b151f886c4
parent8d8a0144303374f69f73fc944dd55c68600d15e5
extend x86_64-xlate.pl perlasm so it can handle .rodata sections properly

For nasm/masm assembler flavors the xlate script must make sure the code
won't land in .rodata section along the data.

For masm we also need to introduce an .align option which can be passed
along section header. It's hint for masm to align rodata/rdata section
properly.

Also macos-x flavor requires small tweak to emit proper section header
for its assembler style.

Changes for masm flavor are based on SEGMENT description [1] in
MASM reference manual.

Changes for nasm flavor are based on nasm 2.14 manual chapter 7 [2].

Details behind macos-x changes can be found in 'Overview of the Mach-O
Executable Format' [3]

[1] https://learn.microsoft.com/en-us/cpp/assembler/masm/segment?view=msvc-170

[2] https://nasm.us/xdoc/2.14rc0/html/nasmdoc7.html

[3] https://developer.apple.com/library/archive/documentation/Performance/Conceptual/CodeFootprint/Articles/MachOOverview.html

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23997)
crypto/perlasm/x86_64-xlate.pl