comparison src/unexelf.c @ 318:afd57c14dfc8 r21-0b57

Import from CVS: tag r21-0b57
author cvs
date Mon, 13 Aug 2007 10:45:36 +0200
parents ca9a9ec9c1c1
children 3b3709405255
comparison
equal deleted inserted replaced
317:a2fc9afbef65 318:afd57c14dfc8
864 symp = (ElfW(Sym) *) (NEW_SECTION_H (n).sh_offset + new_base); 864 symp = (ElfW(Sym) *) (NEW_SECTION_H (n).sh_offset + new_base);
865 symendp = (ElfW(Sym) *) ((byte *)symp + NEW_SECTION_H (n).sh_size); 865 symendp = (ElfW(Sym) *) ((byte *)symp + NEW_SECTION_H (n).sh_size);
866 866
867 for (; symp < symendp; symp ++) 867 for (; symp < symendp; symp ++)
868 if (strcmp ((char *) (symnames + symp->st_name), "_end") == 0 868 if (strcmp ((char *) (symnames + symp->st_name), "_end") == 0
869 || strcmp ((char *) (symnames + symp->st_name), "_edata") == 0) 869 || strcmp ((char *) (symnames + symp->st_name), "end") == 0
870 || strcmp ((char *) (symnames + symp->st_name), "_edata") == 0
871 || strcmp ((char *) (symnames + symp->st_name), "edata") == 0)
870 memcpy (&symp->st_value, &new_bss_addr, sizeof (new_bss_addr)); 872 memcpy (&symp->st_value, &new_bss_addr, sizeof (new_bss_addr));
871 } 873 }
872 874
873 /* This loop seeks out relocation sections for the data section, so 875 /* This loop seeks out relocation sections for the data section, so
874 that it can undo relocations performed by the runtime linker. */ 876 that it can undo relocations performed by the runtime linker. */