[Bug 165970] [libc] [patch] strtonum() optimization

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Aug 23 22:19:09 UTC 2014


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=165970

Jilles Tjoelker <jilles at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jilles at FreeBSD.org

--- Comment #8 from Jilles Tjoelker <jilles at 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.


More information about the freebsd-bugs mailing list