This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 3086dcbcf Revert "Add loading of ET_DYN shared object test to sotest"
3086dcbcf is described below
commit 3086dcbcf034c551d78424de430d2d702015d129
Author: Tiago Medicci Serrano <[email protected]>
AuthorDate: Thu May 30 14:04:01 2024 -0300
Revert "Add loading of ET_DYN shared object test to sotest"
This reverts commit 72eaed8fddde32c8d1de6bb4d980750d5ddcbb3f.
---
examples/sotest/lib/Makefile | 4 +--
examples/sotest/lib/dynload/.gitignore | 1 -
examples/sotest/lib/dynload/Makefile | 55 ----------------------------------
examples/sotest/lib/dynload/dynload.c | 51 -------------------------------
examples/sotest/sotest_main.c | 34 ---------------------
5 files changed, 2 insertions(+), 143 deletions(-)
diff --git a/examples/sotest/lib/Makefile b/examples/sotest/lib/Makefile
index 67644c9d9..734944203 100644
--- a/examples/sotest/lib/Makefile
+++ b/examples/sotest/lib/Makefile
@@ -24,8 +24,8 @@ ALL_SUBDIRS = sotest
BUILD_SUBDIRS = sotest
ifneq ($(CONFIG_MODLIB_MAXDEPEND),0)
-ALL_SUBDIRS += modprint dynload
-BUILD_SUBDIRS += modprint dynload
+ALL_SUBDIRS += modprint
+BUILD_SUBDIRS += modprint
endif
SOTEST_DIR = $(APPDIR)/examples/sotest
diff --git a/examples/sotest/lib/dynload/.gitignore
b/examples/sotest/lib/dynload/.gitignore
deleted file mode 100644
index 8b560f106..000000000
--- a/examples/sotest/lib/dynload/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/dynload
diff --git a/examples/sotest/lib/dynload/Makefile
b/examples/sotest/lib/dynload/Makefile
deleted file mode 100644
index 65ce0fced..000000000
--- a/examples/sotest/lib/dynload/Makefile
+++ /dev/null
@@ -1,55 +0,0 @@
-############################################################################
-# apps/examples/sotest/lib/dynload/Makefile
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership. The
-# ASF licenses this file to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance with the
-# License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-#
-############################################################################
-
-include $(APPDIR)/Make.defs
-
-ifeq ($(CONFIG_EXAMPLES_SOTEST_LIBC),y)
-LDLIBPATH += -L $(NUTTXLIB)
-endif
-
-ifeq ($(CONFIG_EXAMPLES_SOTEST_LIBC),y)
-LDLIBS += -lc
-endif
-
-BIN = dynload
-
-SRCS = $(BIN).c
-OBJS = $(SRCS:.c=$(OBJEXT))
-
-all: $(BIN)
-.PHONY: all clean install
-
-$(OBJS): %$(OBJEXT): %.c
- @echo "MODULECC: $<"
- $(Q) $(MODULECC) -c $(CMODULEFLAGS) $(SHCCFLAGS) $< -o $@
-
-$(BIN): $(OBJS)
- @echo "MODULELD: $<"
- $(Q) $(MODULELD) $(SHMODULEFLAGS) $(LDLIBPATH) -o $@ $^ $(LDLIBS)
-
-$(FSROOT_DIR)/$(BIN): $(BIN)
- $(Q) mkdir -p $(FSROOT_DIR)
- $(Q) install $(BIN) $(FSROOT_DIR)/$(BIN)
-
-install: $(FSROOT_DIR)/$(BIN)
-
-clean:
- $(call DELFILE, $(BIN))
- $(call CLEAN)
diff --git a/examples/sotest/lib/dynload/dynload.c
b/examples/sotest/lib/dynload/dynload.c
deleted file mode 100644
index 25255cba9..000000000
--- a/examples/sotest/lib/dynload/dynload.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
- * apps/examples/sotest/lib/dynload/dynload.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership. The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <stdarg.h>
-#include <stdio.h>
-
-#include <nuttx/symtab.h>
-#include <nuttx/lib/modlib.h>
-
-/****************************************************************************
- * Private Function Prototypes
- ****************************************************************************/
-
-int dynload(int);
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: dynload
- ****************************************************************************/
-
-int dynload(int a)
-{
- return a + 10;
-}
diff --git a/examples/sotest/sotest_main.c b/examples/sotest/sotest_main.c
index 8bd61776a..5c1568e59 100644
--- a/examples/sotest/sotest_main.c
+++ b/examples/sotest/sotest_main.c
@@ -105,7 +105,6 @@ int main(int argc, FAR char *argv[])
char devname[32];
#if CONFIG_MODLIB_MAXDEPEND > 0
FAR void *handle1;
- FAR void *handle3;
#endif
FAR void *handle2;
CODE void (*testfunc)(FAR const char *msg);
@@ -171,32 +170,6 @@ int main(int argc, FAR char *argv[])
fprintf(stderr, "ERROR: dlopen(/modprint) failed\n");
exit(EXIT_FAILURE);
}
-
- handle3 = dlopen(BINDIR "/dynload", RTLD_NOW | RTLD_LOCAL);
- if (handle3 == NULL)
- {
- fprintf(stderr, "ERROR: dlopen(/dynload) failed - %s\n",
- strerror(errno));
- exit(EXIT_FAILURE);
- }
- else
- {
- int (*dynload)(int);
- dynload = dlsym(handle3, "dynload");
- if (dynload != NULL)
- {
- int a = dynload(32);
- printf("dynload returned %d which is the %s answer\n",
- a, (a == 42 ? "correct" : "incorrect"));
- }
- else
- {
- fprintf(stderr, "ERROR: dlsym(dynload) failed - %s\n",
- strerror(errno));
- exit(EXIT_FAILURE);
- }
- }
-
#endif
/* Install the second test shared library */
@@ -300,13 +273,6 @@ int main(int argc, FAR char *argv[])
fprintf(stderr, "ERROR: dlclose(handle1) failed: %d\n", ret);
exit(EXIT_FAILURE);
}
-
- ret = dlclose(handle3);
- if (ret < 0)
- {
- fprintf(stderr, "ERROR: dlclose(handle3) failed: %d\n", ret);
- exit(EXIT_FAILURE);
- }
#endif
#ifdef CONFIG_EXAMPLES_SOTEST_BUILTINFS