Inline helpers need to be exported unmangled.
__open_2() is used by the fortify implementation of open(2) in
fcntl.h, and as such needs an unmangled C name. For some reason
(inlining?), this doesn't cause problems at the default optimization
level, but does for -O0.
The rest of these didn't cause build failures, but they look suspect
and probably will, we just haven't caught them yet.
(cherry-pick of 658727e111 with conflicts
in stdio.h and string.h.)
Bug: 17784968
Change-Id: I7391a7a8999ee204eaf6abd14a3d5373ea419d5b
This commit is contained in:
committed by
Elliott Hughes
parent
ce92b41a00
commit
55ee845b8e
@@ -197,12 +197,13 @@ extern int tcsetpgrp(int fd, pid_t _pid);
|
||||
} while (_rc == -1 && errno == EINTR); \
|
||||
_rc; })
|
||||
|
||||
#if defined(__BIONIC_FORTIFY)
|
||||
extern ssize_t __read_chk(int, void*, size_t, size_t);
|
||||
__errordecl(__read_dest_size_error, "read called with size bigger than destination");
|
||||
__errordecl(__read_count_toobig_error, "read called with count > SSIZE_MAX");
|
||||
extern ssize_t __read_real(int, void*, size_t) __RENAME(read);
|
||||
|
||||
#if defined(__BIONIC_FORTIFY)
|
||||
|
||||
__BIONIC_FORTIFY_INLINE
|
||||
ssize_t read(int fd, void* buf, size_t count) {
|
||||
size_t bos = __bos0(buf);
|
||||
|
||||
Reference in New Issue
Block a user