Date: Sat, 23 Aug 2014 22:19:09 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 165970] [libc] [patch] strtonum() optimization Message-ID: <bug-165970-8-zr3VbN9Bno@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-165970-8@https.bugs.freebsd.org/bugzilla/> References: <bug-165970-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=165970 Jilles Tjoelker <jilles@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jilles@FreeBSD.org --- Comment #8 from Jilles Tjoelker <jilles@FreeBSD.org> --- To keep libc.so size and rtld work down, it would be better to eliminate the ev array and set a pair of variables instead of 'error'. The compiler will merge the two copies of the string literal "invalid" (the C standard does not require this, but gcc and clang have done this for many years). Rationale: rtld must fix up any pointer inside libc's data segment for the load address, which adds a relocation entry of several words and increases the amount of written memory in every process (including processes that do not use strtonum() at all). Referring to a string constant in code does not have this issue. -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-165970-8-zr3VbN9Bno>