compiler: separate package exports from entry roots
This commit is contained in:
@@ -101,12 +101,11 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
Lnk l = {0};
|
||||
/* Seed the symbol table with the entry point so archive pulls
|
||||
* include the .o that defines it. Without this, a libwwrt.a
|
||||
* containing start.o is silently skipped if no user .o
|
||||
* references _start, and the entry falls back to main — which
|
||||
* has no proper exit path. */
|
||||
/* Seed both accepted entry symbols before archive loading. The root
|
||||
* package archive then participates in the same selective member-pull
|
||||
* protocol as every dependency; libwwrt.a still supplies _start. */
|
||||
(void)l_intern(&l, "_start");
|
||||
(void)l_intern(&l, "main");
|
||||
for (int i = 0; i < ninputs; i++) {
|
||||
if (l_load(&l, inputs[i]) != 0) return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user