NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/58208 CVS commit: src/libexec/ld.elf_so



The following reply was made to PR lib/58208; it has been noted by GNATS.

From: "Taylor R Campbell" <riastradh%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/58208 CVS commit: src/libexec/ld.elf_so
Date: Fri, 2 May 2025 23:05:11 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Fri May  2 23:05:11 UTC 2025
 
 Modified Files:
 	src/libexec/ld.elf_so: Makefile
 
 Log Message:
 ld.elf_so(1): Skip the ctype(3) guard pages.
 
 These came in via libc_pic.a.  They aren't very useful because
 nothing mprotects them in ld.elf_so -- ld.elf_so ignores its own
 constructors.  We could fill them with gibberish in a feeble attempt
 to highlight ctype(3) abuse...or we could just audit ld.elf_so and
 save on the memory by.
 
 This uses a .PATH.c reachover for the ctype_.c file rather than
 pulling ctype_.pico out of libc_pic.a.
 
 Sampling of space savings:
 
 (amd64)
 $ size ld.elf_so.{before,after}/ld.elf_so
    text    data     bss     dec     hex filename
   81168    2456    1928   85552   14e30 ld.elf_so.before/ld.elf_so
   65068    2408    1928   69404   10f1c ld.elf_so.after/ld.elf_so
 
 (mips64)
 $ size ld.elf_so.{before,after}/ld.elf_so
    text    data     bss     dec     hex filename
  131729     752    1408  133889   20b01 ld.elf_so.before/ld.elf_so
   73185     748    1408   75341   1264d ld.elf_so.after/ld.elf_so
 
 (alpha)
 $ size ld.elf_so.{before,after}/ld.elf_so
    text    data     bss     dec     hex filename
  113893    1096    1860  116849   1c871 ld.elf_so.before/ld.elf_so
   79680    1048    1860   82588   1429c ld.elf_so.after/ld.elf_so
 
 20-50% reduction in ld.elf_so size isn't too shabby (except this was
 all just bloat I had inadvertently caused last month, oops).
 
 PR lib/58208: ctype(3) provides poor runtime feedback of abuse
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.150 -r1.151 src/libexec/ld.elf_so/Makefile
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


Home | Main Index | Thread Index | Old Index