put the embedded blob code section in .rodata to fix x-only

discussed with deraadt@, kettenis@, tb@
This commit is contained in:
robert 2023-01-19 12:42:03 +00:00
parent cb2bf76c52
commit 8f64011107
2 changed files with 16 additions and 0 deletions

View File

@ -7,6 +7,7 @@ DPB_PROPERTIES= parallel parallel2
COMMENT= Chromium browser
V= 109.0.5414.74
REVISION= 0
DISTNAME= chromium-${V}

View File

@ -0,0 +1,15 @@
Index: v8/src/snapshot/embedded/embedded-file-writer.cc
--- v8/src/snapshot/embedded/embedded-file-writer.cc.orig
+++ v8/src/snapshot/embedded/embedded-file-writer.cc
@@ -137,7 +137,11 @@ void EmbeddedFileWriter::WriteCodeSection(PlatformEmbe
w->Comment(
"The embedded blob code section starts here. It contains the builtin");
w->Comment("instruction streams.");
+#if V8_TARGET_OS_OPENBSD
+ w->SectionRoData();
+#else
w->SectionText();
+#endif
#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64
// UMA needs an exposed function-type label at the start of the embedded