Skip to content

Linking Android Chrome for arm64 gives: Unsupported relocation type Unknown aarch64 relocation type 0x13a #1753

@agrieve

Description

@agrieve

Repro steps:

  1. Checkout chrome: https://chromium.googlesource.com/chromium/src/+/main/docs/android_build_instructions.md#Get-the-code
  2. Write out/Debug/args.gn:
target_os = "android"
treat_warnings_as_errors = false
experimental_linker_path = "PATH_TO/wild"
arm_control_flow_integrity = "none"
is_component_build=false
  1. autoninja -C out/Debug libchrome.so

This gives:

stdout:
WARNING: wild: --fix-cortex-a53-843419 is not yet supported
WARNING: wild: --use-android-relr-tags is not yet supported
WARNING: wild: --pack-dyn-relocs=relr is not yet supported
stderr:

thread '<unnamed>' (2081826) panicked at libwild/src/elf_aarch64.rs:135:79:
called `Result::unwrap()` on an `Err` value: Unsupported relocation type Unknown aarch64 relocation type 0x13a
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
...

You can also repro on a vastly smaller target:

autoninja -C out/Debug libchrome_crashpad_handler.so

It seems mold has the same issue, and provides the source paths of the unrecognized relocations. Filed rui314/mold#1561

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions