Differences From Artifact [964c1adbfe]:
- File src/runtime/linklib/linklib.m — part of check-in [754bf24742] at 2019-02-07 21:31:16 on branch trunk — More style improvements (user: js, size: 10402) [annotate] [blame] [check-ins using]
To Artifact [b14664876b]:
- File
src/runtime/linklib/linklib.m
— part of check-in
[98e5c779c8]
at
2019-02-17 03:05:44
on branch trunk
— runtime/linklib: Use CONSTRUCTOR_P on MorphOS
This ensures the runtime gets initialized before anything else. (user: js, size: 10338) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
54 55 56 57 58 59 60 | extern void __register_frame_info(const void *, void *); extern void __deregister_frame_info(const void *); struct Library *ObjFWRTBase; void *__objc_class_name_Protocol; static void | < < < | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | extern void __register_frame_info(const void *, void *); extern void __deregister_frame_info(const void *); struct Library *ObjFWRTBase; void *__objc_class_name_Protocol; static void ctor(void) { static bool initialized = false; struct objc_libc libc = { .malloc = malloc, .calloc = calloc, .realloc = realloc, |
︙ | ︙ | |||
108 109 110 111 112 113 114 | fputs("Failed to initialize objfw_rt.library!\n", stderr); abort(); } initialized = true; } | < < < < | < | > > > | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | fputs("Failed to initialize objfw_rt.library!\n", stderr); abort(); } initialized = true; } static void __attribute__((__unused__)) dtor(void) { CloseLibrary(ObjFWRTBase); } #if defined(OF_AMIGAOS_M68K) ADD2INIT(ctor, -2); ADD2EXIT(dtor, -2); #elif defined(OF_MORPHOS) CONSTRUCTOR_P(ctor, -2); DESTRUCTOR_P(dtor, -2); #endif void __objc_exec_class(void *module) { /* * The compiler generates constructors that call into this, so it is |
︙ | ︙ |