Changeset ba3841e2 in mainline


Ignore:
Timestamp:
2018-04-15T18:28:04Z (7 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
363fe7e
Parents:
c1f44ca
Message:

libposix: get rid of dlopen() override

The trick we used to override libc's dlopen() doesn't work with
shared libraries. Since it's just an extra warning message, remove
it to avoid future headaches.

Location:
uspace/lib/posix
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/Makefile

    rc1f44ca rba3841e2  
    3535INCLUDE_LIBC = ./include/libc
    3636
    37 LIBC_FILE = $(LIBC_PREFIX)/libc.a
    38 
    39 FIXED_C_LIBRARY = libc4posix.a
    40 MERGED_C_LIBRARY = libc.a
    41 MERGE_LIBRARIES = \
    42         $(FIXED_C_LIBRARY) \
    43         $(LIBRARY).a \
    44         $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a \
    45         $(LIBSOFTINT_PREFIX)/libsoftint.a
    46 
    4737SPECS = gcc.specs
    4838LIBC_LINKER_SCRIPT = $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld
     
    5444        ../math/libmath.a \
    5545        ../clui/libclui.a \
    56         $(MERGED_C_LIBRARY) \
     46        $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a \
     47        $(LIBSOFTINT_PREFIX)/libsoftint.a \
     48        $(LIBC_PREFIX)/libc.a \
     49        $(LIBRARY).a \
    5750        $(EXPORT_STARTUP_FILE) \
    5851        $(EXPORT_LINKER_SCRIPT) \
    5952        $(SPECS)
    6053
    61 REDEFS_HIDE_LIBC = redefs-hide-libc-symbols.list
     54PRE_DEPEND = $(INCLUDE_LIBC)
     55EXTRA_CLEAN = $(INCLUDE_LIBC)
    6256
    63 PRE_DEPEND = $(INCLUDE_LIBC)
    64 EXTRA_CLEAN = \
    65         $(INCLUDE_LIBC) \
    66         $(REDEFS_HIDE_LIBC) \
    67         libc.o
    68 
    69 EXTRA_OUTPUT = $(FIXED_C_LIBRARY) $(FIXED_POSIX_LIBRARY) $(MERGED_C_LIBRARY) $(SPECS) $(EXPORT_LINKER_SCRIPT) $(EXPORT_STARTUP_FILE)
     57EXTRA_OUTPUT = $(SPECS) $(EXPORT_LINKER_SCRIPT) $(EXPORT_STARTUP_FILE)
    7058
    7159SOURCES = \
     
    10694
    10795EXPORT_LDLIBS = \
    108         -lmath -lc
     96        --start-group -lposix -lmath -lc -lsoftfloat -lsoftint --end-group
    10997
    11098EXPORT_CFLAGS = \
     
    179167        rm -rf $(EXPORT_DIR)/include
    180168        mv $(EXPORT_DIR)/include.new $(EXPORT_DIR)/include
    181 
    182 $(FIXED_C_LIBRARY): $(LIBC_FILE) $(REDEFS_HIDE_LIBC)
    183         $(OBJCOPY) --redefine-syms=$(REDEFS_HIDE_LIBC) $(LIBC_FILE) $@
    184 
    185 $(MERGED_C_LIBRARY): $(MERGE_LIBRARIES)
    186         $(LD) --fatal-warnings -r -o libc.o --whole-archive $(MERGE_LIBRARIES) --no-whole-archive
    187         $(AR) rc $@ libc.o
    188 
    189 $(REDEFS_HIDE_LIBC): $(SOURCES)
    190         sed -n -e 's/_HIDE_LIBC_SYMBOL(\(.*\));/\1 __helenos_libc_\1/p' $(SOURCES) >$@
  • uspace/lib/posix/src/dlfcn.c

    rc1f44ca rba3841e2  
    3434#include "posix/dlfcn.h"
    3535
    36 _HIDE_LIBC_SYMBOL(dlopen);
    37 extern void *__helenos_libc_dlopen(const char *filename, int flags);
    38 
    39 void *dlopen(const char *filename, int flags)
    40 {
    41         if (flags != 0) {
    42                 fprintf(stderr, "dlopen() not implemented with non-zero flags (%s:%d), something will NOT work.\n", __FILE__, __LINE__);
    43         }
    44 
    45         return __helenos_libc_dlopen(filename, 0);
    46 }
    47 
    4836int dlclose(void *handle)
    4937{
Note: See TracChangeset for help on using the changeset viewer.