BFD/elflinker create empty symbols in symtab after binutils-2.20
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro Binutils |
Invalid
|
Undecided
|
Unassigned |
Bug Description
When the symbol entry in rodata.str1.1 is fully-merged by relaxing, the BFD/elflinker will create a zero address empty name symbol in symtab after binutils-2.20 since the bit of SEC_EXCLUDE in flag will be set by following code (elf_link_
if (name == NULL || *name == '\0')
elfsym->st_name = 0;
else if (input_sec->flags & SEC_EXCLUDE)
elfsym->st_name = 0; // st_name will be set to emtry
else
{
elfsym-
if (elfsym->st_name == (unsigned long) -1)
return 0;
}
I think it's make sense that the address of NOTYPE symbol must be behind its section but zero address is not behind section "rodata.str1.1". In addition, Android's prelink makes errors for zero address symbol when prelinking.
Note: before binutils-2.19, merged string is saved in .glue_t section.
Changed in binutils-linaro: | |
status: | New → Invalid |
here hist post to linaro-dev on this: http:// lists.linaro. org/pipermail/ linaro- dev/2011- January/ 002153. html