Browse Source

Remove unneeded -D<somedefine>, and use instead #ifdef __somedefine__
From Peter Mazinger.

Joakim Tjernlund 19 years ago
parent
commit
e93138024a
4 changed files with 4 additions and 8 deletions
  1. 0 4
      ldso/ldso/Makefile
  2. 1 1
      ldso/ldso/dl-elf.c
  3. 1 1
      ldso/ldso/dl-startup.c
  4. 2 2
      ldso/ldso/ldso.c

+ 0 - 4
ldso/ldso/Makefile

@@ -61,10 +61,6 @@ ifeq ($(strip $(SUPPORT_LD_DEBUG_EARLY)),y)
 XXFLAGS+=-D__SUPPORT_LD_DEBUG_EARLY__
 XXFLAGS+=-D__SUPPORT_LD_DEBUG_EARLY__
 endif
 endif
 
 
-ifeq ($(strip $(FORCE_SHAREABLE_TEXT_SEGMENTS)),y)
-XXFLAGS+=-DFORCE_SHAREABLE_TEXT_SEGMENTS
-endif
-
 #This stuff will not work with -fomit-frame-pointer
 #This stuff will not work with -fomit-frame-pointer
 XXFLAGS := $(XXFLAGS:-fomit-frame-pointer=)
 XXFLAGS := $(XXFLAGS:-fomit-frame-pointer=)
 
 

+ 1 - 1
ldso/ldso/dl-elf.c

@@ -667,7 +667,7 @@ struct elf_resolve *_dl_load_elf_shared_library(int secure,
 	   back again later. */
 	   back again later. */
 
 
 	if (dynamic_info[DT_TEXTREL]) {
 	if (dynamic_info[DT_TEXTREL]) {
-#ifndef FORCE_SHAREABLE_TEXT_SEGMENTS
+#ifndef __FORCE_SHAREABLE_TEXT_SEGMENTS__
 		ppnt = (ElfW(Phdr) *)(intptr_t) & header[epnt->e_phoff];
 		ppnt = (ElfW(Phdr) *)(intptr_t) & header[epnt->e_phoff];
 		for (i = 0; i < epnt->e_phnum; i++, ppnt++) {
 		for (i = 0; i < epnt->e_phnum; i++, ppnt++) {
 			if (ppnt->p_type == PT_LOAD && !(ppnt->p_flags & PF_W))
 			if (ppnt->p_type == PT_LOAD && !(ppnt->p_flags & PF_W))

+ 1 - 1
ldso/ldso/dl-startup.c

@@ -302,7 +302,7 @@ found_got:
 	SEND_STDERR("done scanning DYNAMIC section\n");
 	SEND_STDERR("done scanning DYNAMIC section\n");
 #endif
 #endif
 
 
-#ifndef FORCE_SHAREABLE_TEXT_SEGMENTS
+#ifndef __FORCE_SHAREABLE_TEXT_SEGMENTS__
 	/* Ugly, ugly.  We need to call mprotect to change the protection of
 	/* Ugly, ugly.  We need to call mprotect to change the protection of
 	   the text pages so that we can do the dynamic linking.  We can set the
 	   the text pages so that we can do the dynamic linking.  We can set the
 	   protection back again once we are done */
 	   protection back again once we are done */

+ 2 - 2
ldso/ldso/ldso.c

@@ -239,7 +239,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr,
 					app_tpnt->dynamic_info[DT_TEXTREL] = 1;
 					app_tpnt->dynamic_info[DT_TEXTREL] = 1;
 				dpnt++;
 				dpnt++;
 			}
 			}
-#ifndef FORCE_SHAREABLE_TEXT_SEGMENTS
+#ifndef __FORCE_SHAREABLE_TEXT_SEGMENTS__
 			/* Ugly, ugly.  We need to call mprotect to change the
 			/* Ugly, ugly.  We need to call mprotect to change the
 			 * protection of the text pages so that we can do the
 			 * protection of the text pages so that we can do the
 			 * dynamic linking.  We can set the protection back
 			 * dynamic linking.  We can set the protection back
@@ -803,7 +803,7 @@ next_lib2:
 	if (_dl_envp)
 	if (_dl_envp)
 		*_dl_envp = (unsigned long) envp;
 		*_dl_envp = (unsigned long) envp;
 
 
-#ifndef FORCE_SHAREABLE_TEXT_SEGMENTS
+#ifndef __FORCE_SHAREABLE_TEXT_SEGMENTS__
 	{
 	{
 		unsigned int j;
 		unsigned int j;
 		ElfW(Phdr) *myppnt;
 		ElfW(Phdr) *myppnt;