summaryrefslogtreecommitdiff
path: root/generateredefinesfile.awk
diff options
context:
space:
mode:
authorMike McLaughlin <mikem@microsoft.com>2018-07-12 23:45:39 -0700
committerGitHub <noreply@github.com>2018-07-12 23:45:39 -0700
commitb89e2305a2c953272c997242d01b66b1bb1e661e (patch)
treeb4064df6f0917351a74722c91d9928789e53c8cc /generateredefinesfile.awk
parent0e22b107e811bc8ab7f3c1caf0943ef760d9f53d (diff)
downloadcoreclr-b89e2305a2c953272c997242d01b66b1bb1e661e.tar.gz
coreclr-b89e2305a2c953272c997242d01b66b1bb1e661e.tar.bz2
coreclr-b89e2305a2c953272c997242d01b66b1bb1e661e.zip
Add prefix to DAC's PAL exports for alpine (#18873)
Added some cmake logic to create assembly include mapping files. One that maps the prefixed name (DAC_foo) to the actual name (foo) which is included in the DAC module and another that maps the actual name to the prefixed name that is included in the SOS, DBI and createdump modules. The data exports like IID_IUnknown are not prefixed and don't need to be (immutable static data). There were some C++ exports functions exported with their decorated names in the CatchHardwareExceptionHolder and NativeExceptionHolderBase classes. Created PAL_* style export functions that implements the code. Fix lldb plugin cmake file to use LLDB_H/LLDB_LIB env vars to build it.
Diffstat (limited to 'generateredefinesfile.awk')
-rw-r--r--generateredefinesfile.awk22
1 files changed, 22 insertions, 0 deletions
diff --git a/generateredefinesfile.awk b/generateredefinesfile.awk
new file mode 100644
index 0000000000..592c19a5dd
--- /dev/null
+++ b/generateredefinesfile.awk
@@ -0,0 +1,22 @@
+# "jump" is the jump instruction for the platform
+# "prefix1" is the prefix of what is being mapped from
+# "prefix2" is the prefix of what is being mapped to
+{
+ # Remove the CR character in case the sources are mapped from
+ # a Windows share and contain CRLF line endings
+ gsub(/\r/,"", $0);
+
+ # Skip empty lines and comment lines starting with semicolon
+ if (NF && !match($0, /^[:space:]*;/))
+ {
+ # Only process the entries that begin with "#"
+ if (match($0, /^#.*/))
+ {
+ gsub(/^#/,"", $0);
+ print "LEAF_ENTRY " prefix1 $0 ", _TEXT"
+ print " " jump " EXTERNAL_C_FUNC(" prefix2 $0 ")"
+ print "LEAF_END " prefix1 $0 ", _TEXT"
+ print ""
+ }
+ }
+}