Home
last modified time | relevance | path

Searched refs:to (Results 1 – 25 of 66) sorted by relevance

123

/bionic/docs/
Dlibc_assembler.md3 This document describes how to verify incoming assembler libc routines.
7 * Update the routine, run the bionic unit tests to verify the routine doesn't
8 have any bugs. See the [Testing](#Testing) section for details about how to
14 the [Unwind Info](#unwind-info) section for details about how to verify this.
16 When benchmarking, it's best to verify on the latest Pixel device supported.
17 Make sure that you benchmark both the big and little cores to verify that
28 Locking to a specific cpu:
33 The bionic benchmarks are used to verify the performance of changes to
39 and pushed on to the device. The commands below show how to do this.
57 command to work, you need to change directory to one of the above
[all …]
Dnative_allocator.md2 This document describes how to verify the native memory allocator on Android.
3 This procedure should be followed when upgrading or moving to a new allocator.
4 A small minor upgrade might not need to run all of the benchmarks, however,
10 It is important to note that there are two modes for a native allocator
11 to run in on Android. The first is the normal allocator, the second is
12 called the svelte config, which is designed to run on memory constrained
14 add this line to the `BoardConfig.mk` for the given target:
26 a native allocator needs to implement.
29 These are functions that are used to implement a memory leak detector
34 call to an allocation function (malloc/free/etc). When a call
[all …]
Ddefines.md1 # When to use which `#define`
3 Using `#ifdef` or equivalents is common when writing portable code. Which to use
5 related to Android.
9 If your code is specific to Android's C library, bionic, use `__BIONIC__`. This
13 seen on Android devices, it is possible to use bionic on the host too.
17 If your code is specific to Android devices, use `__ANDROID__`. This isn't
20 of the OS and needs to behave differently on the host than on the device.
22 remember that it is possible -- if unusual -- to use bionic on the host).
27 `__ANDROID_API__` to test which version you're building against. This is
31 One thing to note (if your code may also be built as part of the OS itself) is
[all …]
D32-bit-abi.md6 that use `off_t` to working on files no larger than 2GiB.
8 Android does not require the `_LARGEFILE_SOURCE` macro to be used to make
12 Android also does not require the `_LARGEFILE64_SOURCE` macro to be used
13 to make `off64_t` and corresponding functions such as `ftruncate64` available.
17 There are a couple of exceptions to note. Firstly, `off64_t` and the single
42 If your code stops compiling when you move to NDK r15 or later, removing every
43 definition of `_FILE_OFFSET_BITS=64` will restore the behavior you used to have:
46 aren't aware that `_FILE_OFFSET_BITS` is set. You might also have to
47 remove references to `__USE_FILE_OFFSET64` --- this is the internal
51 to double check:
[all …]
Delf-tls.md25 few instructions. TLS variables belonging to dlopen'ed shared objects, on the other hand, may be
38 According to Drepper, variant 2 was motivated by backwards compatibility, and variant 1 was designed
40 an executable, the linker needs to know where an executable's TLS segment is relative to the TP so
44 Each thread has a "Dynamic Thread Vector" (DTV) with a pointer to each module's TLS block (or NULL
47 expected to point immediately at the DTV pointer, whereas in variant 2, the DTV pointer's offset
50 The DTV's "generation" field is used to lazily update/reallocate the DTV when new modules are loaded
57 When a C/C++ file references a TLS variable, the toolchain generates instructions to find its
70 A GD access can refer to a TLS variable anywhere. To access a variable `tls_var` using the
72 call to a `__tls_get_addr` function provided by libc.
100 `R_TLS_DTPMOD` is a dynamic relocation to the index of the module containing `tls_var`, and
[all …]
Dfdsan.md6 *What problem is fdsan trying to solve? Why should I care?*
8to manifest as *use-after-close* and *double-close*. These errors are direct analogues of the memo…
38 … (e.g. suppose thread two was saving user data to disk when a third thread came in and opened a so…
43to detect and/or prevent file descriptor mismanagement by enforcing file descriptor ownership. Lik…
45to set a 64-bit closure tag on a file descriptor. The tag consists of an 8-bit type byte that iden…
55 …- Upon detecting an error, emit a warning to logcat, generate a tombstone, and then continue execu…
63 The likelihood of fdsan catching a file descriptor error is proportional to the percentage of file …
65 ### Using fdsan to fix a bug
68 Let's look at a simple contrived example that uses sleeps to force a particular interleaving of thr…
89 err(1, "good failed to write?!");
[all …]
Dstatus.md7 for changes related to native code loading in various Android releases.
13 You can see the current status with respect to POSIX in the form of tests:
38 * Thread cancellation (`pthread_cancel`). Unlikely to ever be implemented
74 * Bug fixes to handling of UTF-8 U+fffe/U+ffff and code points above U+10ffff.
78 corresponding pointer argument, leading to obscure errors. The scanf family
97 …* <signal.h> support for `sigaction64_t` and `sigset64_t` allowing LP32 access to real-time signals
108 * Passing a null `FILE*` or `DIR*` to libc is now detected at runtime and
135 * Passing an invalid `pthread_t` to libc is now detected at runtime and
272 but there are likely to be more in future because of Project Treble.
276 As part of a long-term goal to remove the global thread list,
[all …]
/bionic/
Dandroid-changes-for-ndk-developers.md3 This document details important changes related to native code
13 you need to have the “binutils” package installed for readelf,
20 will be tied to an app's target API level:
25 * At the affected API level and above, we’ll refuse to load the library.
34 toasts help bring some visibility to the issues before it's too late.
36 ## Changes to library dependency resolution
41 had to call `dlopen` or `System.loadLibrary` on all transitive
45 to topologically sort your libraries and load them in reverse order.
47 If you need to support Android devices running OS
48 versions older than JB-MR2, you might want to consider
[all …]
DREADME.md12 This documentation is about making changes to bionic itself.
23 `cos(3)` in a separate library to save space in the days before shared
29 that the dynamic linker replaces with pointers to its own implementation at
34 The C++ ABI support functions. The C++ compiler doesn't know how to implement
42 has a `DT_INTERP` entry that says "use the following program to start me". On
45 into memory and resolving references to symbols (so that when your code tries to
46 jump to `fopen(3)`, say, it lands in the right place).
88 # generate_uapi_headers.sh script should be used to go from a kernel tree to
90 # details. The update_all.py script should be used to regenerate bionic's
108 # This is where we keep the hacks necessary to build BSD source
[all …]
/bionic/libc/async_safe/
DREADME.md3 This library provides an async_safe implementation for formatting and writing log messages to logd.
5 Note that the liblog implementation connects a single socket to logd and uses a RWLock to manage
6 it among threads, whereas these functions connect to liblog for each log message. While it's
7 beneficial to have this lock-free and therefore async_safe mechanism to write to logd, connecting
8 a socket for each message does not scale well under load. It was also determined to be too
9 costly to connect a socket for each thread as some processes, such as system_server, have over 100
/bionic/libdl/
DNOTICE19 "control" means (i) the power, direct or indirect, to cause the
28 including but not limited to software source code, documentation
33 not limited to compiled object code, generated documentation,
34 and conversions to other media types.
38 copyright notice that is included in or attached to the work
46 separable from, or merely link (or bind by name) to the interfaces of,
51 to that Work or Derivative Works thereof, that is intentionally
52 submitted to Licensor for inclusion in the Work by the copyright owner
53 or by an individual or Legal Entity authorized to submit on behalf of
56 to the Licensor or its representatives, including but not limited to
[all …]
/bionic/libc/malloc_debug/
DREADME.md7 This documentation describes how to enable this feature on Android N or later
33 Before, a realloc from one size to a smaller size would not update the
34 backtrace related to the allocation. Starting in P, every single realloc
49 to find memory corruption occuring to a region before the original allocation.
51 When the allocation is freed, the guard is checked to verify it has not been
61 on 64 bit systems to make sure that the allocation returned is aligned
64 This option adds a special header to all allocations that contains the guard
75 to find memory corruption occuring to a region after the original allocation.
77 When the allocation is freed, the guard is checked to verify it has not been
84 This option adds a special header to all allocations that contains
[all …]
DREADME_marshmallow_and_earlier.md7 This documentation describes how to enable this feature on API level
10 is not guaranteed to work at all.
15 On these old versions of the OS, you must be able to set system properties
16 using the setprop command from the shell. This requires the ability to
45 When enabled, this value creates a special header to all allocations
52 might cause timeouts when trying to start a device.
56 by a call to get\_malloc\_leak\_info (see README\_api.md for details).
72 When enabled, this value creates a special header to all allocations
83 When the allocation is freed, both of these guards are verified to contain
84 the expected patterns. If not, then an error message is printed to the log.
[all …]
DREADME_api.md3 Malloc debug can be used to get information on all of the live allocations
5 used to gather this data from a process. This tracking can be enabled using
8 The function to gather the data:
12 *info* is set to a buffer allocated by the call that contains all of
14 *overall\_size* is set to the total size of the buffer returned. If this
17 *total\_memory* is set to the sum of all allocation sizes that are live at
20 *backtrace\_size* is set to the maximum number of backtrace entries
23 In order to free the buffer allocated by the function, call:
38 *backtrace\_size* as returned by the original call to
43 incorrectly set to the number of frames in the backtrace.
[all …]
/bionic/benchmarks/
DREADME.md8 on top of [Google Benchmark](https://github.com/google/benchmark) with some additions to organize
20 `--benchmark_filter=getpid` to run just the benchmarks with "getpid" in their name.
34 the file will be found as relative to the current directory. If the option specifies the full path
35 to an XML file such as `/data/nativetest/suites/example.xml`, it will be used as-is.
37 If no XML file is specified through the command-line option, the default is to use `suites/full.xml…
38 However, for the host bionic benchmarks (`bionic-benchmarks-glibc`), the default is to use
85 The `spawn/` subdirectory has a few benchmarks measuring the time used to start simple programs
96 spent in the spawned process. The real-time is probably more useful, and it is the figure used to
99 Locking the CPU frequency seems to improve the results of these benchmarks significantly, and it
106 Google Benchmark uses two settings to control how many times to run each benchmark, "iterations" and
[all …]
/bionic/libc/upstream-openbsd/lib/libc/string/
Dstpcpy.c40 stpcpy(char *to, const char *from) in stpcpy() argument
42 for (; (*to = *from) != '\0'; ++from, ++to); in stpcpy()
43 return(to); in stpcpy()
Dstrcpy.c40 strcpy(char *to, const char *from) in strcpy() argument
42 char *save = to; in strcpy()
44 for (; (*to = *from) != '\0'; ++from, ++to); in strcpy()
/bionic/libc/upstream-freebsd/lib/libc/string/
Dwcpcpy.c43 wcpcpy(wchar_t * __restrict to, const wchar_t * __restrict from) in wcpcpy() argument
46 for (; (*to = *from); ++from, ++to); in wcpcpy()
47 return(to); in wcpcpy()
/bionic/libc/kernel/
DREADME.md8 unmodified kernel headers in order to get rid of many annoying
30 Contains various Python and shell scripts used to get and re-generate
33 The tools to get/parse the headers:
71 Before running the command to import the headers, make sure that you have
73 to determine which directory to use as the destination directory.
75 After running lunch, run this command to import the headers into the android
81 Run this command to automatically download the latest version of the headers
87 Next, run this command to copy the parsed files to bionic/libc/kernel/uapi:
92 After this, you will need to build/test the tree to make sure that these
/bionic/linker/
Dld.config.format.md3 This document describes format of /system/etc/ld.config.txt file. This file can be used to customize
9 1. Mappings - maps executable locations to sections
14 This part of the document maps location of an executable to a section. Here is an example
28 # The following line maps section to a dir. Binaries ran from this location will use namespaces
35 # When this flag is set to true linker will set target_sdk_version for this binary to
41 # This property can be used to declare additional namespaces. Note that there is always the default
79 # and links it to default namespace
83 # This defines what libraries are allowed to be loaded from ns1
DAndroid.bp5 // This is used for bionic on (host) Linux to bootstrap our linker embedded into
51 // We need to access Bionic private headers in the linker.
110 // We need to access Bionic private headers in the linker.
246 // -shared is used to overwrite the -Bstatic and -static flags triggered by enabling
256 // we are going to link libc++_static manually because
257 // when stl is not set to "none" build system adds libdl
258 // to the list of static libraries which needs to be
274 // Insert an extra objcopy step to add prefix to symbols. This is needed to prevent gdb
294 // reference to __gnu_Unwind_Find_exidx, which isn't sufficient to pull in the strong definition
369 // libgcc.a are made static to ld-android.so. This in turn ensures that libraries that
[all …]
/bionic/libc/malloc_hooks/
DREADME.md4 Malloc hooks allows a program to intercept all allocation/free calls that
8 There are two ways to enable these hooks, set a special system
54 called, then the allocated memory is set to zero.
67 When malloc hooks is enabled, then the hook pointers are set to
70 the original hook function to do allocations. If the app does not do this,
109 For example, to enable malloc hooks for the google search box:
115 of 32. This meant that to create a wrap property with the name of the app, it
116 was necessary to truncate the name to fit. On O, property names can be
117 an order of magnitude larger, so there should be no need to truncate the name
/bionic/libc/arch-x86_64/bionic/
D__bionic_clone.S40 # Translate to the kernel calling convention and swap the 'tls' and 'child_tid' arguments.
61 # We don't want anyone to unwind past this point.
74 # We're the parent; nothing to do.
/bionic/tests/libs/
DAndroid.bp10 // Unless required by applicable law or agreed to in writing, software
113 // Library to test gnu-styled hash
123 // Library to test sysv-styled hash
211 // In Android.mk to support zipped and aligned tests
308 // This set of libraries is used to verify linker namespaces.
316 // 4. Check that having access to shared library (libnstest_public.so)
320 // libnstest_root.so (this should be local to the namespace)
370 // This set of libraries is used to verify linker namespaces for allow all
374 // 1. Check that namespace a exposes libnstest_ns_a_public1 to
377 // 2. Check that namespace b exposes all libraries to namespace a.
[all …]
/bionic/libc/
DSECCOMP_BLOCKLIST_APP.TXT1 # This file is used to populate seccomp's allowlist policy in combination with SYSCALLS.TXT.
2 # Note that the resultant policy is applied only to zygote spawned processes.
13 # syscalls to modify IDs
30 # syscalls to modify times
40 # syscalls to change machine various configurations

123