Changeset 03139d5b in rtems for testsuites


Ignore:
Timestamp:
Nov 20, 2018, 3:56:11 AM (12 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
9dfb9a98
Parents:
8e7c72a7
git-author:
Chris Johns <chrisj@…> (11/20/18 03:56:11)
git-committer:
Chris Johns <chrisj@…> (11/22/18 01:43:31)
Message:

libdl: Add object file dependencies to track references

Tracking references lets us manage when an object file can be
unloaded. If an object file has references to it, it cannot be
unloaded.

Modules that depend on each other cannot be unloaded.

Updates #3605

Location:
testsuites/libtests
Files:
14 added
3 edited

Legend:

Unmodified
Added
Removed
  • testsuites/libtests/Makefile.am

    r8e7c72a7 r03139d5b  
    510510        $(AM_V_CCLD)$(LINK.c) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ $+
    511511CLEANFILES += dl06.pre dl06-sym.o dl06-o1.o dl06-o2.o dl06.tar dl06-tar.h
     512endif
     513endif
     514
     515if DLTESTS
     516if TEST_dl07
     517lib_tests += dl07
     518lib_screens += dl07/dl07.scn
     519lib_docs += dl07/dl07.doc
     520dl07_SOURCES = dl07/init.c dl07/dl-load.c dl07-tar.c dl07-tar.h
     521dl07_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_dl07) $(support_includes)
     522dl07/init.c: dl07-tar.o
     523dl07.pre: $(dl07_OBJECTS) $(dl07_DEPENDENCIES)
     524        @rm -f dl07.pre
     525        $(AM_V_CCLD)$(LINK.c) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ $+
     526dl07-o1.o: dl07/dl-o1.c Makefile
     527        $(AM_V_CC)$(COMPILE) -c -o $@ $<
     528dl07-o2.o: dl07/dl-o2.c Makefile
     529        $(AM_V_CC)$(COMPILE) -c -o $@ $<
     530dl07-o3.o: dl07/dl-o3.c Makefile
     531        $(AM_V_CC)$(COMPILE) -c -o $@ $<
     532dl07-o4.o: dl07/dl-o4.c Makefile
     533        $(AM_V_CC)$(COMPILE) -c -o $@ $<
     534dl07-o5.o: dl07/dl-o5.c Makefile
     535        $(AM_V_CC)$(COMPILE) -c -o $@ $<
     536dl07.tar: dl07-o1.o dl07-o2.o dl07-o3.o dl07-o4.o dl07-o5.o
     537        @rm -f $@
     538        $(AM_V_GEN)$(PAX) -w -f $@ $+
     539dl07-tar.c: dl07.tar
     540        $(AM_V_GEN)$(BIN2C) -C $< $@
     541dl07-tar.h: dl07.tar
     542        $(AM_V_GEN)$(BIN2C) -H $< $@
     543dl07-tar.o: dl07-tar.c dl07-tar.h
     544        $(AM_V_CC)$(COMPILE) -c -o $@ $<
     545dl07-sym.o: dl07.pre
     546        $(AM_V_GEN)rtems-syms -e -c "$(CFLAGS)" -o $@ $<
     547dl07$(EXEEXT):  $(dl07_OBJECTS) $(dl07_DEPENDENCIES) dl07-sym.o
     548        @rm -f $@
     549        $(AM_V_CCLD)$(LINK.c) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ $+
     550CLEANFILES += dl07.pre dl07-sym.o dl07-o1.o dl07-o2.o dl07-o3.o dl07-o4.o dl07-o5.o dl07.tar dl07-tar.h
    512551endif
    513552endif
     
    13591398rtems_tests_PROGRAMS = $(lib_tests)
    13601399dist_rtems_tests_DATA = $(lib_screens) $(lib_docs)
    1361 
  • testsuites/libtests/configure.ac

    r8e7c72a7 r03139d5b  
    132132RTEMS_TEST_CHECK([dl05])
    133133RTEMS_TEST_CHECK([dl06])
     134RTEMS_TEST_CHECK([dl07])
    134135RTEMS_TEST_CHECK([dumpbuf01])
    135136RTEMS_TEST_CHECK([dup2])
  • testsuites/libtests/dl02/dl-load.c

    r8e7c72a7 r03139d5b  
    1212
    1313#include "dl-load.h"
     14
     15#include <rtems/rtl/rtl-trace.h>
     16
     17#define DL02_DEBUG_TRACE 0 /* RTEMS_RTL_TRACE_ALL */
     18#define DL02_RTL_CMDS    0
    1419
    1520typedef int (*call_t)(int argc, const char* argv[]);
     
    5055  int    ret;
    5156
     57#if DL02_DEBUG_TRACE
     58  rtems_rtl_trace_set_mask (DL02_DEBUG_TRACE);
     59#endif
     60
    5261  o1 = dl_load_obj("/dl02-o1.o");
    5362  if (!o1)
     
    5766    return 1;
    5867
    59 #if 0
     68#if DL02_RTL_CMDS
    6069  {
    6170    char* list[] = { "rtl", "list", NULL };
Note: See TracChangeset for help on using the changeset viewer.