The branch stable/12 has been updated by kevans:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=0ad2e9eac9c318d9e2422750646d668a0b8fef07

commit 0ad2e9eac9c318d9e2422750646d668a0b8fef07
Author:     Warner Losh <[email protected]>
AuthorDate: 2021-07-12 21:17:05 +0000
Commit:     Kyle Evans <[email protected]>
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(-)

diff --git a/stand/common/load_elf_obj.c b/stand/common/load_elf_obj.c
index 4bff74764922..7df88678a015 100644
--- a/stand/common/load_elf_obj.c
+++ b/stand/common/load_elf_obj.c
@@ -280,8 +280,6 @@ __elfN(obj_loadimage)(struct preloaded_file *fp, elf_file_t 
ef, uint64_t off)
                case SHT_SYMTAB:
                        nsym++;
                        ef->symtabindex = i;
-                       shdr[i].sh_addr = (Elf_Addr)lastaddr;
-                       lastaddr += shdr[i].sh_size;
                        break;
                }
        }

Reply via email to