summaryrefslogtreecommitdiff
path: root/src/internal/vis.h
AgeCommit message (Collapse)AuthorLines
2015-04-22in visibility preinclude, remove overrides for stdin/stdout/stderrRich Felker-3/+0
the motivation for this change is that the extra declaration (with or without visibility) using "struct _IO_FILE" instead of "FILE" seems to trigger a bug in gcc 3.x where it considers the types mismatched. however, this change also results in slightly better code and it is valid because (1) these three objects are constant, and (2) applying the & operator to any of them is invalid C, since they are not even specified to be objects. thus it does not matter if the application and libc see different addresses for them, as long as the (initial, unchanging) value is seen the same by both.
2015-04-19add optional global visibility overrideRich Felker-0/+40
this is implemented via the build system and does not affect source files. the idea is to use protected or hidden visibility to prevent the compiler from pessimizing function calls within a shared (or position-independent static) libc in the form of overhead setting up for a call through the PLT. the ld-time symbol binding via the -Bsymbolic-functions option already optimized out the PLT itself, but not the code in the caller needed to support a call through the PLT. on some archs this overhead can be substantial; on others it's trivial.