From ef6dad5b158a0a7acbed6b6979964cdc228bc79f Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 26 Sep 2022 21:26:20 -0700 Subject: [PATCH] Fix unused variable and label warnings in dcrt1.c Change-Id: I54add45f0525046c72e6291392571475d3164089 --- crt/dcrt1.c | 5 ----- ldso/dlstart.c | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/crt/dcrt1.c b/crt/dcrt1.c index 5e844048..eb1d6652 100644 --- a/crt/dcrt1.c +++ b/crt/dcrt1.c @@ -116,9 +116,6 @@ static char *crt_getenv(const char *name, char **environ) static inline void *map_library(int fd) { - void *allocated_buf=0; - size_t allocated_buf_size; - size_t phsize; size_t addr_min=SIZE_MAX, addr_max=0; size_t this_min, this_max; off_t off_start = 0; @@ -219,7 +216,6 @@ static size_t find_linker(char *outbuf, size_t bufsize, const char *this_path, s { const char *paths[2]; // envpath, rpath/runpath size_t i; - int fd; // In the suid/secure case, skip everything and use the fixed path if (secure) @@ -293,7 +289,6 @@ hidden _Noreturn void __dls2(unsigned char *base, size_t *p) char **argv = (void *)(p+1); int fd; int secure; - int prot = PROT_READ; Ehdr *loader_hdr; Phdr *new_hdr; void *entry; diff --git a/ldso/dlstart.c b/ldso/dlstart.c index 49e6a992..d8218211 100644 --- a/ldso/dlstart.c +++ b/ldso/dlstart.c @@ -163,7 +163,9 @@ hidden void _dlstart_c(size_t *sp, size_t *dynv) #endif stage2_func dls2; +#ifdef DL_DNI skip_relocs: +#endif GETFUNCSYM(&dls2, __dls2, base+dyn[DT_PLTGOT]); dls2((void *)base, sp); } -- 2.37.3.998.g577e59143f-goog