projects
/
slink.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
30b3f40
)
Check for just mainCRTStartup when targeting AMD64 PE
author
Robert Pengelly
<robertapengelly@hotmail.com>
Sat, 20 Jun 2026 18:19:29 +0000
(19:19 +0100)
committer
Robert Pengelly
<robertapengelly@hotmail.com>
Sat, 20 Jun 2026 18:19:29 +0000
(19:19 +0100)
link.c
patch
|
blob
|
history
diff --git
a/link.c
b/link.c
index 31eab401d7801ff571b929dcc27d73395156d45a..e6ae99114c0524c0a7667515bfe196f918c0dd5c 100644
(file)
--- a/
link.c
+++ b/
link.c
@@
-970,7
+970,18
@@
static void calculate_entry_point (void) {
}
- } else if (state->format == LD_FORMAT_I386_PE || state->format == LD_FORMAT_AMD64_PE) {
+ } else if (state->format == LD_FORMAT_AMD64_PE) {
+
+ state->entry_symbol_name = xstrdup ("mainCRTStartup");
+
+ if ((symbol = symbol_find (state->entry_symbol_name))) {
+
+ state->entry_point = symbol_get_value_no_base (symbol);
+ return;
+
+ }
+
+ } else if (state->format == LD_FORMAT_I386_PE) {
state->entry_symbol_name = xstrdup ("_mainCRTStartup");