Alex Rønne Petersen
7bc78967b4
start: Fix _start() to initialize the ToC for powerpc64.
...
The previous version of this function referenced the argc_argv_ptr global
variable as an inline asm operand. This caused LLVM to generate prologue code to
initialize the ToC so that the global variable can actually be accessed.
Ordinarily, there's nothing wrong with that. But _start() is a naked function!
This makes it actually super surprising that LLVM did this. It also means that
the old version only really worked by accident.
Once the reference to the global variable was removed, no ToC was set up, thus
violating the calling convention once we got to posixCallMainAndExit(). This
then caused any attempt to access global variables here to crash - namely when
setting std.os.linux.elf_aux_maybe.
The fix is to just initialize the ToC manually in _start().
2024-07-22 01:22:47 +02:00
..
2024-07-21 02:32:33 -07:00
2024-07-20 05:08:14 +02:00
2024-07-09 14:25:42 -07:00
2024-07-21 01:19:36 -07:00
2024-07-10 10:46:35 -04:00
2024-07-14 11:19:34 +12:00
2024-07-19 11:35:22 -07:00
2024-07-09 14:25:42 -07:00
2024-05-21 19:09:52 +02:00
2024-04-28 00:20:30 -07:00
2024-06-02 16:46:21 -07:00
2024-07-03 15:34:59 -04:00
2024-07-12 00:46:03 -07:00
2023-09-07 21:56:57 +03:00
2024-03-21 14:11:46 -07:00
2024-02-23 02:37:11 -07:00
2024-07-21 02:39:28 -07:00
2024-07-19 00:30:32 -07:00
2024-07-15 10:49:51 -07:00
2024-03-19 11:45:09 -07:00
2024-07-09 14:25:42 -07:00
2024-07-09 14:25:42 -07:00
2024-07-09 14:25:42 -07:00
2023-09-06 19:06:32 +03:00
2024-07-19 00:30:32 -07:00
2024-03-21 14:11:46 -07:00
2023-06-24 16:56:39 -07:00
2024-07-09 14:25:42 -07:00
2024-07-21 01:55:52 -07:00
2024-06-13 10:18:59 -04:00
2024-07-07 12:13:07 +02:00
2024-07-14 00:56:29 +00:00
2024-07-02 16:31:15 +02:00
2024-03-15 02:28:50 -04:00
2024-03-10 18:13:30 -07:00
2024-03-21 14:11:46 -07:00
2024-07-09 14:25:42 -07:00
2024-05-21 13:46:05 +03:00
2023-11-19 09:55:07 +00:00
2024-02-26 15:18:31 -08:00
2024-07-21 01:56:51 -07:00
2024-05-11 02:17:11 -07:00
2024-07-20 05:08:14 +02:00
2024-07-12 00:47:32 -07:00
2024-03-10 18:13:30 -07:00
2024-03-11 18:48:08 -07:00
2024-07-21 02:44:58 -07:00
2024-07-10 10:46:35 -04:00
2024-07-19 00:30:32 -07:00
2024-07-19 16:32:20 -07:00
2024-05-26 16:13:54 -04:00
2024-03-21 14:11:46 -07:00
2024-07-20 01:06:29 -07:00
2024-07-09 13:36:38 -07:00
2024-02-05 11:55:14 +03:30
2024-05-27 13:22:50 +03:00
2023-10-17 13:55:01 -05:00
2024-07-19 00:30:32 -07:00
2024-07-04 21:01:42 +01:00
2024-07-15 10:49:51 -07:00
2024-05-03 13:27:30 -07:00
2024-06-23 04:30:12 +01:00
2023-11-24 22:33:50 -07:00
2024-05-27 20:56:48 -07:00
2024-04-18 20:08:03 -07:00
2024-06-01 13:28:16 +03:00
2024-07-21 01:17:43 -07:00
2024-07-09 14:25:42 -07:00
2024-07-07 22:59:52 -04:00
2024-07-19 00:30:32 -07:00
2024-04-15 15:24:30 -07:00
2024-07-19 00:30:32 -07:00
2024-04-17 13:41:25 +01:00
2024-03-19 11:45:09 -07:00
2024-07-19 11:35:22 -07:00
2024-02-26 15:18:31 -08:00
2024-07-09 14:25:42 -07:00
2024-07-20 01:06:28 -07:00
2024-07-19 00:30:32 -07:00
2024-06-13 10:18:59 -04:00
2024-03-10 18:17:23 +11:00
2024-02-26 15:18:31 -08:00
2024-02-26 15:18:31 -08:00
2024-07-14 23:02:33 -07:00
2024-06-20 12:38:54 -07:00
2023-06-24 16:56:39 -07:00
2024-07-22 01:22:47 +02:00
2024-06-20 23:22:39 +00:00
2024-06-13 10:18:59 -04:00
2024-07-09 14:25:42 -07:00
2024-07-21 00:28:22 -07:00
2024-07-09 13:36:38 -07:00
2024-07-15 10:49:51 -07:00
2024-07-19 00:30:32 -07:00
2024-02-26 15:18:31 -08:00
2023-10-31 21:37:35 -04:00
2024-07-13 14:48:17 -07:00
2024-04-12 22:37:07 -07:00
2024-07-03 19:00:17 +01:00
2024-02-26 15:18:31 -08:00
2024-07-20 01:06:28 -07:00
2024-06-17 16:12:19 -04:00