[K42-discussion] [PATCH] Added empty __cxa_exit functions for destructors to globally scoped objects

Donour Sizemore donour at cs.unm.edu
Fri Aug 25 06:31:53 EST 2006


To apply these patches with git-apply, remember that you need the 
--index flag so the new file will be version controlled.

donour


Donour Sizemore wrote:
> Alternatively, here's the patches broken in two.
> 
> Apply 0064, then 0066.
> 
> donour
> 
> 
> 
> 
> 
> Donour Sizemore wrote:
>> Patrick G. Bridges wrote:
>>> On Aug 24, 2006, at 1:29 PM, Donour Sizemore wrote:
>>>
>>>> This one should work for everybody.
>>> k42sys.o: $(LIB_BASE) $(LIB_EMU) $(LIBDIR)/ProgExecUsr.o glibc_subset.a
>>> -    $(TARGET_CC) -nostdlib -nostartfiles -r -o $@        \
>>> +    $(TARGET_CC) -nostdlib -nostartfiles -r -o $@ \
>>>         -Wl,--whole-archive $(LIB_BASE) $(LIB_EMU) $(LIBDIR)/ 
>>> ProgExecUsr.o \
>>> -        -Wl,--no-whole-archive glibc_subset.a
>>> +        -Wl,--no-whole-archive glibc_subset.a 
>>> /home/donour/git/install/ lib/powerpc/fullDeb/libk.a
>>>
>>> Looks like it still hard-codes your home directory...
>>>
>>> -Patrick
>>>
>>
>> Looks that way, but it doesn't. Keep reading. :)
>>
>> donour
>> _______________________________________________
>> K42-discussion mailing list
>> K42-discussion at ozlabs.org
>> https://ozlabs.org/mailman/listinfo/k42-discussion
> 
> 
> ------------------------------------------------------------------------
> 
> Subject: [PATCH] added cxa_atexit.C
> 
> Signed-off-by: Donour Sizemore <donour at milhouse.localdomain>
> 
> 
> ---
> 
>  lib/libc/stdlib/cxa_atexit.C |   11 +++++++++++
>  1 files changed, 11 insertions(+), 0 deletions(-)
>  create mode 100644 lib/libc/stdlib/cxa_atexit.C
> 
> 94204c1fb338857b9c5e46ed5a008af556439201
> diff --git a/lib/libc/stdlib/cxa_atexit.C b/lib/libc/stdlib/cxa_atexit.C
> new file mode 100644
> index 0000000..c66127e
> --- /dev/null
> +++ b/lib/libc/stdlib/cxa_atexit.C
> @@ -0,0 +1,11 @@
> +extern "C"
> +{
> +  int __cxa_atexit(void (*f)(void *), void *p, void *d);
> +};
> +
> +void *__dso_handle; 
> +   
> +int __cxa_atexit(void (*f)(void *), void *p, void *d)
> +{
> +  return 0;
> +}
> 
> 
> ------------------------------------------------------------------------
> 
> Subject: [PATCH] Added empty __cxa_exit functions for destructors to globally scoped objects
> 
> Signed-off-by: Donour Sizemore <donour at milhouse.localdomain>
> 
> 
> ---
> 
>  lib/Makefile             |    4 ++--
>  lib/libc/stdlib/Make.sub |    2 +-
>  lib/libc/stdlib/Makefile |    2 +-
>  3 files changed, 4 insertions(+), 4 deletions(-)
> 
> fd03e3958715b05419980c7ba4e17208c29c5ad1
> diff --git a/lib/Makefile b/lib/Makefile
> index 73e2800..61cba42 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -107,9 +107,9 @@ glibc_subset.a: glibc_subset.symbols $(K
>  	$(RM) -rf tmp
>  
>  k42sys.o: $(LIB_BASE) $(LIB_EMU) $(LIBDIR)/ProgExecUsr.o glibc_subset.a
> -	$(TARGET_CC) -nostdlib -nostartfiles -r -o $@		\
> +	$(TARGET_CC) -nostdlib -nostartfiles -r -o $@ \
>  	    -Wl,--whole-archive $(LIB_BASE) $(LIB_EMU) $(LIBDIR)/ProgExecUsr.o \
> -	    -Wl,--no-whole-archive glibc_subset.a
> +	    -Wl,--no-whole-archive glibc_subset.a $(LIBDIR)/libk.a 
>  	@echo "$(TARGET_NM) -p $@ | egrep -w U"
>  	@if $(TARGET_NM) -p $@ | egrep -w U; then \
>  	    echo "Error:  undefined symbols found in $@"; \
> diff --git a/lib/libc/stdlib/Make.sub b/lib/libc/stdlib/Make.sub
> index 2b14671..01dd227 100644
> --- a/lib/libc/stdlib/Make.sub
> +++ b/lib/libc/stdlib/Make.sub
> @@ -1,7 +1,7 @@
>  # Objects and include files from here
>  
>  libkstdlibobjs = baseAtoi.o baseFgets.o baseSprintf.o baseStrtol.o isctype.o \
> -               memccpy.o memcmp.o string.o
> +               memccpy.o memcmp.o string.o cxa_atexit.o
>  
>  stdlib_includes = ctype.h float.h limits.h string.h 
>  
> diff --git a/lib/libc/stdlib/Makefile b/lib/libc/stdlib/Makefile
> index 1ec19da..ff8ce58 100644
> --- a/lib/libc/stdlib/Makefile
> +++ b/lib/libc/stdlib/Makefile
> @@ -36,7 +36,7 @@ COMMONSRCS = baseSprintf.C
>  
>  LIBNATVSRCS += isctype.C memccpy.C memcmp.C string.C baseAtoi.c baseStrtol.c baseFgets.C 
>  LIBCSRCS += $(COMMONSRCS) chario.C
> -LIBKSRCS += $(COMMONSRCS) $(LIBNATVSRCS)
> +LIBKSRCS += $(COMMONSRCS) $(LIBNATVSRCS) cxa_atexit.C
>  CLASSES  +=
>  SRCS     +=
>  TARGETS  +=
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> K42-discussion mailing list
> K42-discussion at ozlabs.org
> https://ozlabs.org/mailman/listinfo/k42-discussion




More information about the K42-discussion mailing list