Switch the __x86.get_pc_thunk.bx functions from .gnu.linkonce to comdat
section groups. lld doesn't implement .gnu.linkonce and will instead
discard the input sections. It might produce a faulty binary that has
no get_pc_thunk function in it, which would crash.
Normally, these functions are generated by GCC and are present in many
object files compiled with PIC. Clang doesn't use them, and instead
initializes the PIC base register with a "call 1f; 1: pop %ebx" pair.
I also added cfi_startproc / cfi_endproc to be consistent with current
GCC output.
I marked this CL with do-not-merge because the code it touches has been
removed in the next release, so it won't merge. I reviewed the
automerger graph, and this do-not-merge CL:
- will be applied to qt-qpr1-dev-plus-aosp (which needs the CL)
- won't be applied to rvc-dev-plus-aosp (which doesn't need the CL)
https://android-build.googleplex.com/builds/automerger/graph/project/googleplex-android/platform/system/core
Bug: http://b/154376560
Bug: https://bugs.llvm.org/show_bug.cgi?id=45594
Test: VM boots
Change-Id: I681c4c46503aff65f32a22c9da15397a42b67183
Even though mdnsresponder seems to allow us to use _adb_secure_connect
and _adb_secure_pairing as service names, these names violate the syntax
outlined in RFC6763, and may not be compatible with other dns-sd
implementations.
Also address some comments from a previous CL.
Bug: 154268895
Test: atest adbd_test
Change-Id: Ia872e976fc4276587b500a827a41d46d9dc755dd
Userdebug devices enable JDWP for every process, so if adbd is turned
off manually, we get an error message for every single process on the
system.
Bug: http://b/154319466
Test: manual
Change-Id: Ia702974d371e35497573c31e22cfb2b572334590
Since this function is used in userspace reboot, we need to be more
diligent with error handling, e.g.:
* If init fails to read /sys/block/zram0/backing_dev, then fail and
fallback to hard reboot.
* Always call swapoff.
* Always reset zram.
* Tear down loop device only if zram is backed by a loop device.
Test: adb reboot userspace
Bug: 153917129
Change-Id: I4709da1d08cf427ad9c898cfb2506b6a29f1d680
Merged-In: I4709da1d08cf427ad9c898cfb2506b6a29f1d680
(cherry picked from commit a840d405eb)
Previously, we weren't distinguishing between nonexistent devices and
devices that don't support features, resulting in lots of stuff being
broken for pre-N devices.
Bug: http://b/154272158
Test: adb shell on a JB emulator
Change-Id: I0058b2a60678e1ad0503f5abac30157be976c9c4
libsnapshot* uses update_metadata-protos. This
used to be optimized out, but now that SnapshotManager is
virtual, CreateUpdateSnapshots can no longer be optimized out.
Bug: 148956645
Test: compiles
Change-Id: Ib67cafd156308bf5a477996ec32eb786f8e896db
This uses an experimental Linux kernel API for reading the tags across
processes using ptrace.
Bug: 135772972
Test: Unit tests pass.
Change-Id: Ib1a09d9219166011de80cf250b756bb8a4bcdb0a
ImageManagerTest had been temporarily disabled because flaky.
This test looks stable now, re-enable it.
Bug: 148889015
Test: atest vts_libsnapshot_test [-- --abi x86]
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I858661fed7f58d1e2857ed88f5d8e0f5220bf8c2
The month field is one based in the zipfile modification time. And
it causes an overflow converting it to struct tm. Switch to type to
signed integer to suppress the sub-overflow.
Bug: 153882979
Test: parse the problematic zipfile
Change-Id: Iaf47bcc7f83d61b18c9e7a98bb6ab3936c9257e3
We can't use the sysdeps.h copy of this code, so for now add yet
another copy & paste. We should come up with something better in
libbase, but let's get the macOS build fixed first.
Test: builds on mac
Change-Id: Ifb059990d7091f3d91b54e684f4ee14afe69c28b
Add a number of benchmarks to time how long it takes to look
up symbols.
Test: Ran benchmarks on device.
Change-Id: Iab7aab3f60c2c7056395beca3d36263420bcb5dc
If the first stage console is being used, attempt to run /first_stage.sh
immediately before the console is created.
Bug: 154126020
Change-Id: I8b7431e7b8219afea295b120d7ea91751804bda6
tl,dr;
Increase the attempts to 50 to reduce the chances of failing
to load the serial console. This will only happen if the cmdline
parameter "androidboot.first_stage_console=1" is enabled.
Details:
10 attempts only amounts to about 1 second of trying to open the serial
console. I tested booting an ACK GKI image 5x with 20 vendor modules and
found the serial console loaded on attempt 17 for all five boot
tests.
Bug: 153354917
Test: boot ACK image 5x and verify serial console comes up
Change-Id: I161a4176b2c6cf7b0bc1eefe072ff38b894add5d
Merged-In: I161a4176b2c6cf7b0bc1eefe072ff38b894add5d
To fix mac build error. Shouldn't be building this for the host.
Bug: N/A
Test: mma in system/core/adb on mac.
Change-Id: I8b86d265ef9b91eeaf7a4e5d6623a5399403ecaf
This test is pretty straight forward: create two large files, then merge
one into the other while injecting kernel crashes. At the end,
block-by-block validation is performed against both the snapshot-merge target
and the file written to disk.
Bug: 139092356
Test: instructions in PowerTest.md
Change-Id: I28cc88160cf824039966abff4e61382090a354c5
The newer way of specifying the interface is using <fqname> and it also
has the handy side-effect of not causing conflicts when we add the
strongbox implementation to devices.
Test: make # check $OUT for the correct manifest
Change-Id: If8333814723261c4f3de375861ee19a6d922d55f
We should check if the data to read resides within the boundary of
the extended field. Also check OOB when reading bytes from the
zipfile.
Bug: 153828925
Test: parse the poc with hwasan build
Change-Id: I54b58a287b9ae4ca0e5cc563086c1ed8051fb72a
Some of the test cases in CtsInitTestCases and CtsFsMgrTestCases require
root. This CL makes it possible to run such tests cases on userdebug
builds, which in turn means that they will be run on presubmit.
New option was implemented in
https://android-review.googlesource.com/c/platform/tools/tradefederation/+/1283834
Test: atest CtsInitTestCases
Test: atest CtsFsMgrTestCases
Change-Id: I3d29789ddd7ac549e40ac193c58d986670c49285