diff mbox series

[RFC,6/6] mach: In rtld, mark MIG routines as __TEXT_STARTUP

Message ID 20230515144815.3939017-7-bugaevc@gmail.com
State New
Headers show
Series .text.subsections for some questionable benefit | expand

Commit Message

Sergey Bugaev May 15, 2023, 2:48 p.m. UTC
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 mach/Machrules | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/mach/Machrules b/mach/Machrules
index d52f672d..22e6c94d 100644
--- a/mach/Machrules
+++ b/mach/Machrules
@@ -217,6 +217,10 @@  $(foreach o,$(object-suffixes),$(interfaces-routines:%=%$o)): $(some-if-rtn).d
 generated += $(some-if-rtn).d
 endif
 
+# When building for rtld, we're only supposed to use the ld.so versions of
+# the RPCs during startup, so put them all into .text.startup.
+$(objpfx)rtld-RPC_%.os: rtld-CPPFLAGS += -Dmig_external=__TEXT_STARTUP
+
 # If defined, $(interface-library) is `libNAME'.  It is to be a library
 # containing all the MiG-generated functions for the specified interfaces.