Commit 48513628 authored by Tom Tan's avatar Tom Tan Committed by Commit Bot

Use .rdata as section name for asm targeting COFF

.rdata is the default section which hosts read-only data for COFF. Use this
default section name avoids creating a new .rodata section with explicit
read-only property.

Bug: chromium:919180
Change-Id: I7325cbcfdb142b3ee15de93b7881f755c365d6e6
Reviewed-on: https://chromium-review.googlesource.com/c/1407240
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58764}
parent 3d473064
......@@ -347,8 +347,7 @@ void PlatformDependentEmbeddedFileWriter::SectionData() {
void PlatformDependentEmbeddedFileWriter::SectionRoData() {
#if defined(V8_OS_WIN)
// .rodata defaults to r/w in COFF, but read only in ELF.
fprintf(fp_, ".section .rodata,\"r\"\n");
fprintf(fp_, ".section .rdata\n");
#else
fprintf(fp_, ".section .rodata\n");
#endif
......
......@@ -17,8 +17,6 @@ def asm_to_inl_asm(in_filename, out_filename):
with open(in_filename, 'r') as infile, open(out_filename, 'wb') as outfile:
outfile.write('__asm__(\n')
for line in infile:
# Escape " in .S file before output it to inline asm file.
line = line.replace('"', '\\"')
outfile.write(' "%s\\n"\n' % line.rstrip())
outfile.write(');\n')
return 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment