When loader loads relocatable object in load_elf_obj.c it wastes space worth symbol table section size. The diff below fixes it: ==== //depot/prod/freebsd/Rtricky_freebsd6.0/usr/src/sys/boot/common/load_elf_obj.c#1 - /u/neelnatu/p4/tricky/freebsd/usr/src/sys/boot/common/load_elf_obj.c ==== 241,242d240 < shdr[i].sh_addr = (Elf_Addr)lastaddr; < lastaddr += shdr[i].sh_size;
Responsible Changed From-To: freebsd-bugs->kmacy I know that the fix is valid. Just need feedback from peter or jhb.
Responsible Changed From-To: kmacy->freebsd-bugs kmacy has asked for all of his PRs to be reassigned, put back into the pool.
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped
After some study, I think this fix looks good to my eye. I've created review https://reviews.freebsd.org/D31017 for it.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=297e9f364b5aa243572ee52b1faef9b3542c1c9e commit 297e9f364b5aa243572ee52b1faef9b3542c1c9e Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2021-07-12 21:17:05 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2021-07-12 21:30:27 +0000 loader: Don't reserve space for symbols twice. The current code bumps lastaddr twice for the symbol table location. However, the first bump is bogus and results in wasted space. Remove it. PR: 110995 Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D31017 stand/common/load_elf_obj.c | 2 -- 1 file changed, 2 deletions(-)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=1e1d3725569fac88a9baeac88af8da82d00779d1 commit 1e1d3725569fac88a9baeac88af8da82d00779d1 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2021-07-12 21:17:05 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2021-07-16 18:28:45 +0000 loader: Don't reserve space for symbols twice. The current code bumps lastaddr twice for the symbol table location. However, the first bump is bogus and results in wasted space. Remove it. PR: 110995 Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D31017 (cherry picked from commit 297e9f364b5aa243572ee52b1faef9b3542c1c9e) stand/common/load_elf_obj.c | 2 -- 1 file changed, 2 deletions(-)
A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=0ad2e9eac9c318d9e2422750646d668a0b8fef07 commit 0ad2e9eac9c318d9e2422750646d668a0b8fef07 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2021-07-12 21:17:05 +0000 Commit: Kyle Evans <kevans@FreeBSD.org> CommitDate: 2021-10-08 01:16:00 +0000 loader: Don't reserve space for symbols twice. The current code bumps lastaddr twice for the symbol table location. However, the first bump is bogus and results in wasted space. Remove it. PR: 110995 (cherry picked from commit 297e9f364b5aa243572ee52b1faef9b3542c1c9e) stand/common/load_elf_obj.c | 2 -- 1 file changed, 2 deletions(-)