Forked from
redox-os / relibc
Source project has a limited visibility.
-
Ahmed Abd El Mawgood authored
Most shared object in linux have their initialization in a separate .init_array section. but glibc does not have the same behavour. Instead the initialization is part of crt0. which (as it seams to me) run after .init_array section. As such, this patch move IO initialization to separate function that is marked as .init_array member and then the crt0 call this function only if init_array was never invoked (as in statically linked binaries).
Ahmed Abd El Mawgood authoredMost shared object in linux have their initialization in a separate .init_array section. but glibc does not have the same behavour. Instead the initialization is part of crt0. which (as it seams to me) run after .init_array section. As such, this patch move IO initialization to separate function that is marked as .init_array member and then the crt0 call this function only if init_array was never invoked (as in statically linked binaries).