Differences From Artifact [141357802d]:
- File
src/runtime/linklib/linklib.m
— part of check-in
[c12ca9484e]
at
2020-03-08 13:49:49
on branch trunk
— runtime/linklib: __attribute__((used)) for [cd]tor
Otherwise, amiga-gcc strips it when optimizations are enabled, resulting
in a linker error. (user: js, size: 14210) [annotate] [blame] [check-ins using] [more...]
To Artifact [c66c0c6229]:
- File src/runtime/linklib/linklib.m — part of check-in [fa90c6cb2c] at 2020-06-07 21:32:55 on branch amiga-library — Clean up a little (user: js, size: 14680) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
14 15 16 17 18 19 20 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #import "ObjFWRT.h" | | > | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #import "ObjFWRT.h" #import "amiga-library.h" #import "macros.h" #import "private.h" #include <proto/exec.h> struct ObjFWRTBase; #import "inline.h" |
︙ | ︙ | |||
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | extern void _Unwind_SetIP(void *, uintptr_t); extern void _Unwind_SetGR(void *, int, uintptr_t); #ifdef HAVE_SJLJ_EXCEPTIONS extern void _Unwind_SjLj_Resume(void *); #else extern void _Unwind_Resume(void *); #endif 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 __attribute__((__used__)) ctor(void) { | > > | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | extern void _Unwind_SetIP(void *, uintptr_t); extern void _Unwind_SetGR(void *, int, uintptr_t); #ifdef HAVE_SJLJ_EXCEPTIONS extern void _Unwind_SjLj_Resume(void *); #else extern void _Unwind_Resume(void *); #endif #ifdef OF_AMIGAOS_M68K extern void __register_frame_info(const void *, void *); extern void *__deregister_frame_info(const void *); #endif struct Library *ObjFWRTBase; void *__objc_class_name_Protocol; static void __attribute__((__used__)) ctor(void) { |
︙ | ︙ | |||
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | ._Unwind_SetIP = _Unwind_SetIP, ._Unwind_SetGR = _Unwind_SetGR, #ifdef HAVE_SJLJ_EXCEPTIONS ._Unwind_SjLj_Resume = _Unwind_SjLj_Resume, #else ._Unwind_Resume = _Unwind_Resume, #endif .__register_frame_info = __register_frame_info, .__deregister_frame_info = __deregister_frame_info, }; if (initialized) return; if ((ObjFWRTBase = OpenLibrary(OBJFWRT_AMIGA_LIB, OBJFWRT_LIB_MINOR)) == NULL) { | > > > > > > > | | > > > > > > | | 94 95 96 97 98 99 100 101 102 103 104 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 131 132 133 134 135 | ._Unwind_SetIP = _Unwind_SetIP, ._Unwind_SetGR = _Unwind_SetGR, #ifdef HAVE_SJLJ_EXCEPTIONS ._Unwind_SjLj_Resume = _Unwind_SjLj_Resume, #else ._Unwind_Resume = _Unwind_Resume, #endif #ifdef OF_AMIGAOS_M68K .__register_frame_info = __register_frame_info, .__deregister_frame_info = __deregister_frame_info, #endif }; if (initialized) return; if ((ObjFWRTBase = OpenLibrary(OBJFWRT_AMIGA_LIB, OBJFWRT_LIB_MINOR)) == NULL) { /* * The linklib is used by objfw(68k).library as well, so we * can't have the compiler optimize this to another function, * hence the use of an unnecessary format specifier. */ fprintf(stderr, "Failed to open %s!\n", OBJFWRT_AMIGA_LIB); abort(); } if (!glue_objc_init(1, &libc, __sF)) { /* * The linklib is used by objfw(68k).library as well, so we * can't have the compiler optimize this to another function, * hence the use of an unnecessary format specifier. */ fprintf(stderr, "Failed to initialize %s!\n", OBJFWRT_AMIGA_LIB); abort(); } initialized = true; } static void __attribute__((__used__)) |
︙ | ︙ |