[PATCH] (version 2) Change MIPS linker stubs to allow for more than 2^15 symbols.
Richard Sandiford
richard@codesourcery.com
Sun Jun 11 20:03:00 GMT 2006
More information about the Binutils mailing list
Sun Jun 11 20:03:00 GMT 2006
- Previous message (by thread): [PATCH] (version 2) Change MIPS linker stubs to allow for more than 2^15 symbols.
- Next message (by thread): [PATCH] (version 2) Change MIPS linker stubs to allow for more than 2^15 symbols.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thiemo Seufer <ths@networkno.de> writes: > Richard Sandiford wrote: >> Thiemo Seufer <ths@networkno.de> writes: >> > I felt the urge to do some more cleanups (interdiff appended), >> > the only function change was to add the IRIX dummy entry to the >> > worst case calculation. >> >> Which IRIX dummy entry? If you're referring to the dummy entry at >> the beginning of the symbol table, that entry is a gABI feature and >> is already accounted for. > > The one mentioned immediately below: > > /* In the worst case, we'll get one stub per dynamic symbol, plus > to account for the dummy entry at the end required by IRIX > rld. */ > > and also > > /* IRIX rld assumes that the function stub isn't at the end > of .text section. So put a dummy. XXX */ I don't understand. The code you changed in your patch is counting _symbols_ not stubs: /* Get a worst-case estimate of the number of dynamic symbols needed. At this point, dynsymcount does not account for section symbols and count_section_dynsyms may overestimate the number that will be needed. */ dynsymcount = (elf_hash_table (info)->dynsymcount + count_section_dynsyms (output_bfd, info)); That's the calculation you added 1 to. The code that counts the number of _stubs_ already takes the dummy stub into account. You've quoted the comment for that code yourself ;) /* In the worst case, we'll get one stub per dynamic symbol, plus one to account for the dummy entry at the end required by IRIX rld. */ loadable_size += htab->function_stub_size * (i + 1); If we'd got that wrong, we'd have been missing the dummy stub before the current patch series. Note that here, "per dynaamic symbol" means "per GOT-mapped dynamic symbol" (i.e. all those after DT_MIPS_GOTSYM). "i" already holds that value, and its calculation is not affected by the recent patches. Richard
- Previous message (by thread): [PATCH] (version 2) Change MIPS linker stubs to allow for more than 2^15 symbols.
- Next message (by thread): [PATCH] (version 2) Change MIPS linker stubs to allow for more than 2^15 symbols.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list