OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This is the version of the Android-specific Chromium linker that uses | 5 // This is the version of the Android-specific Chromium linker that uses |
6 // the crazy linker to load libraries. | 6 // the crazy linker to load libraries. |
7 | 7 |
8 // This source code *cannot* depend on anything from base/ or the C++ | 8 // This source code *cannot* depend on anything from base/ or the C++ |
9 // STL, to keep the final library small, and avoid ugly dependency issues. | 9 // STL, to keep the final library small, and avoid ugly dependency issues. |
10 | 10 |
11 #include "legacy_linker_jni.h" | 11 #include "legacy_linker_jni.h" |
12 | 12 |
13 #include <crazy_linker.h> | 13 #include <crazy_linker.h> |
14 #include <fcntl.h> | 14 #include <fcntl.h> |
15 #include <jni.h> | 15 #include <jni.h> |
16 #include <limits.h> | 16 #include <limits.h> |
| 17 #include <stddef.h> |
17 #include <stdlib.h> | 18 #include <stdlib.h> |
18 #include <unistd.h> | 19 #include <unistd.h> |
19 | 20 |
20 #include "linker_jni.h" | 21 #include "linker_jni.h" |
21 | 22 |
22 namespace chromium_android_linker { | 23 namespace chromium_android_linker { |
23 namespace { | 24 namespace { |
24 | 25 |
25 // Retrieve the SDK build version and pass it into the crazy linker. This | 26 // Retrieve the SDK build version and pass it into the crazy linker. This |
26 // needs to be done early in initialization, before any other crazy linker | 27 // needs to be done early in initialization, before any other crazy linker |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 crazy_context_set_java_vm(context, vm, JNI_VERSION_1_4); | 472 crazy_context_set_java_vm(context, vm, JNI_VERSION_1_4); |
472 | 473 |
473 // Register the function that the crazy linker can call to post code | 474 // Register the function that the crazy linker can call to post code |
474 // for later execution. | 475 // for later execution. |
475 crazy_context_set_callback_poster(context, &PostForLaterExecution, nullptr); | 476 crazy_context_set_callback_poster(context, &PostForLaterExecution, nullptr); |
476 | 477 |
477 return true; | 478 return true; |
478 } | 479 } |
479 | 480 |
480 } // namespace chromium_android_linker | 481 } // namespace chromium_android_linker |
OLD | NEW |