public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/rtld-shared] elf: Make _dl_map_object_from_fd static
@ 2021-08-10 12:43 Adhemerval Zanella
0 siblings, 0 replies; 3+ messages in thread
From: Adhemerval Zanella @ 2021-08-10 12:43 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=def0211371e47dfa9646404e40b17a0f6afda20f
commit def0211371e47dfa9646404e40b17a0f6afda20f
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Aug 10 09:38:06 2021 -0300
elf: Make _dl_map_object_from_fd static
And remove ancient Hurd not enabled by default.
Diff:
---
elf/dl-load.c | 5 +----
sysdeps/mach/hurd/Makefile | 2 --
sysdeps/mach/hurd/dl-sysdep.c | 47 -------------------------------------------
3 files changed, 1 insertion(+), 53 deletions(-)
diff --git a/elf/dl-load.c b/elf/dl-load.c
index fb23ba632b..8533add1b4 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -931,10 +931,7 @@ _dl_process_pt_gnu_property (struct link_map *l, int fd, const ElfW(Phdr) *ph)
/* Map in the shared object NAME, actually located in REALNAME, and already
opened on FD. */
-#ifndef EXTERNAL_MAP_FROM_FD
-static
-#endif
-struct link_map *
+static struct link_map *
_dl_map_object_from_fd (const char *name, const char *origname, int fd,
struct filebuf *fbp, char *realname,
struct link_map *loader, int l_type, int mode,
diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile
index 17bb643c18..532a890a57 100644
--- a/sysdeps/mach/hurd/Makefile
+++ b/sysdeps/mach/hurd/Makefile
@@ -167,8 +167,6 @@ $(inst_libdir)/libc.so: $(rpcuserlibs)
# objects directly into the shared object.
ifeq (elf,$(subdir))
$(objpfx)librtld.map: $(rpcuserlibs:.so=_pic.a)
-
-CFLAGS-dl-load.c = -DEXTERNAL_MAP_FROM_FD
endif
# Override the generic Makeconfig values so we link against the RPC libs.
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 4b2072e5d5..62e6a5011b 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -149,53 +149,6 @@ _dl_sysdep_start (void **start_argptr,
unfmh(); /* XXX */
-#if 0 /* XXX make this work for real someday... */
- if (_dl_hurd_data->user_entry == (vm_address_t) ENTRY_POINT)
- /* We were invoked as a command, not as the program interpreter.
- The generic ld.so code supports this: it will parse the args
- as "ld.so PROGRAM [ARGS...]". For booting the Hurd, we
- support an additional special syntax:
- ld.so [-LIBS...] PROGRAM [ARGS...]
- Each LIBS word consists of "FILENAME=MEMOBJ";
- for example "-/lib/libc.so=123" says that the contents of
- /lib/libc.so are found in a memory object whose port name
- in our task is 123. */
- while (_dl_argc > 2 && _dl_argv[1][0] == '-' && _dl_argv[1][1] != '-')
- {
- char *lastslash, *memobjname, *p;
- struct link_map *l;
- mach_port_t memobj;
- error_t err;
-
- ++_dl_skip_args;
- --_dl_argc;
- p = _dl_argv++[1] + 1;
-
- memobjname = strchr (p, '=');
- if (! memobjname)
- _dl_sysdep_fatal ("Bogus library spec: ", p, "\n", NULL);
- *memobjname++ = '\0';
- memobj = 0;
- while (*memobjname != '\0')
- memobj = (memobj * 10) + (*memobjname++ - '0');
-
- /* Add a user reference on the memory object port, so we will
- still have one after _dl_map_object_from_fd calls our
- `close'. */
- err = __mach_port_mod_refs (__mach_task_self (), memobj,
- MACH_PORT_RIGHT_SEND, +1);
- assert_perror (err);
-
- lastslash = strrchr (p, '/');
- l = _dl_map_object_from_fd (lastslash ? lastslash + 1 : p, NULL,
- memobj, strdup (p), 0);
-
- /* Squirrel away the memory object port where it
- can be retrieved by the program later. */
- l->l_info[DT_NULL] = (void *) memobj;
- }
-#endif
-
/* Call elf/rtld.c's main program. It will set everything
up and leave us to transfer control to USER_ENTRY. */
(*dl_main) ((const ElfW(Phdr) *) _dl_hurd_data->phdr,
^ permalink raw reply [flat|nested] 3+ messages in thread
* [glibc/azanella/rtld-shared] elf: Make _dl_map_object_from_fd static
@ 2021-09-27 18:54 Adhemerval Zanella
0 siblings, 0 replies; 3+ messages in thread
From: Adhemerval Zanella @ 2021-09-27 18:54 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e53e26dc0c90090406e70fc86c5603d31471c17d
commit e53e26dc0c90090406e70fc86c5603d31471c17d
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Aug 10 09:38:06 2021 -0300
elf: Make _dl_map_object_from_fd static
And remove ancient Hurd not enabled by default.
Diff:
---
elf/dl-load.c | 5 +----
sysdeps/mach/hurd/Makefile | 2 --
sysdeps/mach/hurd/dl-sysdep.c | 47 -------------------------------------------
3 files changed, 1 insertion(+), 53 deletions(-)
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 36ad7ca020..4f06c5e510 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -931,10 +931,7 @@ _dl_process_pt_gnu_property (struct link_map *l, int fd, const ElfW(Phdr) *ph)
/* Map in the shared object NAME, actually located in REALNAME, and already
opened on FD. */
-#ifndef EXTERNAL_MAP_FROM_FD
-static
-#endif
-struct link_map *
+static struct link_map *
_dl_map_object_from_fd (const char *name, const char *origname, int fd,
struct filebuf *fbp, char *realname,
struct link_map *loader, int l_type, int mode,
diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile
index 17bb643c18..532a890a57 100644
--- a/sysdeps/mach/hurd/Makefile
+++ b/sysdeps/mach/hurd/Makefile
@@ -167,8 +167,6 @@ $(inst_libdir)/libc.so: $(rpcuserlibs)
# objects directly into the shared object.
ifeq (elf,$(subdir))
$(objpfx)librtld.map: $(rpcuserlibs:.so=_pic.a)
-
-CFLAGS-dl-load.c = -DEXTERNAL_MAP_FROM_FD
endif
# Override the generic Makeconfig values so we link against the RPC libs.
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 968a58f668..fa1f7be729 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -116,53 +116,6 @@ _dl_sysdep_start (void **start_argptr,
&& _dl_hurd_data->user_entry == 0)
_dl_hurd_data->user_entry = (vm_address_t) ENTRY_POINT;
-#if 0 /* XXX make this work for real someday... */
- if (_dl_hurd_data->user_entry == (vm_address_t) ENTRY_POINT)
- /* We were invoked as a command, not as the program interpreter.
- The generic ld.so code supports this: it will parse the args
- as "ld.so PROGRAM [ARGS...]". For booting the Hurd, we
- support an additional special syntax:
- ld.so [-LIBS...] PROGRAM [ARGS...]
- Each LIBS word consists of "FILENAME=MEMOBJ";
- for example "-/lib/libc.so=123" says that the contents of
- /lib/libc.so are found in a memory object whose port name
- in our task is 123. */
- while (_dl_argc > 2 && _dl_argv[1][0] == '-' && _dl_argv[1][1] != '-')
- {
- char *lastslash, *memobjname, *p;
- struct link_map *l;
- mach_port_t memobj;
- error_t err;
-
- ++_dl_skip_args;
- --_dl_argc;
- p = _dl_argv++[1] + 1;
-
- memobjname = strchr (p, '=');
- if (! memobjname)
- _dl_sysdep_fatal ("Bogus library spec: ", p, "\n", NULL);
- *memobjname++ = '\0';
- memobj = 0;
- while (*memobjname != '\0')
- memobj = (memobj * 10) + (*memobjname++ - '0');
-
- /* Add a user reference on the memory object port, so we will
- still have one after _dl_map_object_from_fd calls our
- `close'. */
- err = __mach_port_mod_refs (__mach_task_self (), memobj,
- MACH_PORT_RIGHT_SEND, +1);
- assert_perror (err);
-
- lastslash = strrchr (p, '/');
- l = _dl_map_object_from_fd (lastslash ? lastslash + 1 : p, NULL,
- memobj, strdup (p), 0);
-
- /* Squirrel away the memory object port where it
- can be retrieved by the program later. */
- l->l_info[DT_NULL] = (void *) memobj;
- }
-#endif
-
/* Call elf/rtld.c's main program. It will set everything
up and leave us to transfer control to USER_ENTRY. */
(*dl_main) ((const ElfW(Phdr) *) _dl_hurd_data->phdr,
^ permalink raw reply [flat|nested] 3+ messages in thread
* [glibc/azanella/rtld-shared] elf: Make _dl_map_object_from_fd static
@ 2021-08-10 13:42 Adhemerval Zanella
0 siblings, 0 replies; 3+ messages in thread
From: Adhemerval Zanella @ 2021-08-10 13:42 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2ae4f06da6c3ad00807f746128e1f87a541062b9
commit 2ae4f06da6c3ad00807f746128e1f87a541062b9
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Aug 10 09:38:06 2021 -0300
elf: Make _dl_map_object_from_fd static
And remove ancient Hurd not enabled by default.
Diff:
---
elf/dl-load.c | 5 +----
sysdeps/mach/hurd/Makefile | 2 --
sysdeps/mach/hurd/dl-sysdep.c | 47 -------------------------------------------
3 files changed, 1 insertion(+), 53 deletions(-)
diff --git a/elf/dl-load.c b/elf/dl-load.c
index fb23ba632b..8533add1b4 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -931,10 +931,7 @@ _dl_process_pt_gnu_property (struct link_map *l, int fd, const ElfW(Phdr) *ph)
/* Map in the shared object NAME, actually located in REALNAME, and already
opened on FD. */
-#ifndef EXTERNAL_MAP_FROM_FD
-static
-#endif
-struct link_map *
+static struct link_map *
_dl_map_object_from_fd (const char *name, const char *origname, int fd,
struct filebuf *fbp, char *realname,
struct link_map *loader, int l_type, int mode,
diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile
index 17bb643c18..532a890a57 100644
--- a/sysdeps/mach/hurd/Makefile
+++ b/sysdeps/mach/hurd/Makefile
@@ -167,8 +167,6 @@ $(inst_libdir)/libc.so: $(rpcuserlibs)
# objects directly into the shared object.
ifeq (elf,$(subdir))
$(objpfx)librtld.map: $(rpcuserlibs:.so=_pic.a)
-
-CFLAGS-dl-load.c = -DEXTERNAL_MAP_FROM_FD
endif
# Override the generic Makeconfig values so we link against the RPC libs.
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 4b2072e5d5..62e6a5011b 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -149,53 +149,6 @@ _dl_sysdep_start (void **start_argptr,
unfmh(); /* XXX */
-#if 0 /* XXX make this work for real someday... */
- if (_dl_hurd_data->user_entry == (vm_address_t) ENTRY_POINT)
- /* We were invoked as a command, not as the program interpreter.
- The generic ld.so code supports this: it will parse the args
- as "ld.so PROGRAM [ARGS...]". For booting the Hurd, we
- support an additional special syntax:
- ld.so [-LIBS...] PROGRAM [ARGS...]
- Each LIBS word consists of "FILENAME=MEMOBJ";
- for example "-/lib/libc.so=123" says that the contents of
- /lib/libc.so are found in a memory object whose port name
- in our task is 123. */
- while (_dl_argc > 2 && _dl_argv[1][0] == '-' && _dl_argv[1][1] != '-')
- {
- char *lastslash, *memobjname, *p;
- struct link_map *l;
- mach_port_t memobj;
- error_t err;
-
- ++_dl_skip_args;
- --_dl_argc;
- p = _dl_argv++[1] + 1;
-
- memobjname = strchr (p, '=');
- if (! memobjname)
- _dl_sysdep_fatal ("Bogus library spec: ", p, "\n", NULL);
- *memobjname++ = '\0';
- memobj = 0;
- while (*memobjname != '\0')
- memobj = (memobj * 10) + (*memobjname++ - '0');
-
- /* Add a user reference on the memory object port, so we will
- still have one after _dl_map_object_from_fd calls our
- `close'. */
- err = __mach_port_mod_refs (__mach_task_self (), memobj,
- MACH_PORT_RIGHT_SEND, +1);
- assert_perror (err);
-
- lastslash = strrchr (p, '/');
- l = _dl_map_object_from_fd (lastslash ? lastslash + 1 : p, NULL,
- memobj, strdup (p), 0);
-
- /* Squirrel away the memory object port where it
- can be retrieved by the program later. */
- l->l_info[DT_NULL] = (void *) memobj;
- }
-#endif
-
/* Call elf/rtld.c's main program. It will set everything
up and leave us to transfer control to USER_ENTRY. */
(*dl_main) ((const ElfW(Phdr) *) _dl_hurd_data->phdr,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-27 18:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10 12:43 [glibc/azanella/rtld-shared] elf: Make _dl_map_object_from_fd static Adhemerval Zanella
2021-08-10 13:42 Adhemerval Zanella
2021-09-27 18:54 Adhemerval Zanella
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).