HomePhabricator

[ELF] - Make LLD accept Ttext-segment X/Ttext-segment=X aliases for -Ttext.
Audit RequiredrL289827

Description

[ELF] - Make LLD accept Ttext-segment X/Ttext-segment=X aliases for -Ttext.

It os used in work/emulators/qemu-user-static port.
Which tries to use -Ttext-segment and then:

  1. In case ld does not support -Ttext-segment, edit the default linker
  2. script via sed to set the .text start addr. This is needed on FreeBSD
  3. at least.

<here it calls -verbose to extract and edit default bfd linker script.>

Actually now we are do not fully support -Ttext properly (see D27613),
but we also seems never will provide anything close to default script, like bfd do,
so at least this patch introduces proper alias handling.

Details

Auditors
Bigcheese
Committed
grimarDec 15 2016, 8:12 AM
Parents
rL289826: Fix ubsan failures in lane mask shifts
Branches
Unknown
Tags
Unknown