[lld] r277680 - Make filler expression compatible with gold.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 4 13:45:02 PDT 2016


On 4 August 2016 at 16:18, Rui Ueyama <ruiu at google.com> wrote:
> My observation is different; gold handles numbers starting with 0x as a
> binary of arbitrary size in hexstring. How did you test it?


With an assembly file with just

        .align 16
        .long 42

a linker script with

SECTIONS
{
  .text : {*(.text) } = 0xa
}

and linking with

ld.gold -T  test.script test.o test.o  -shared -o test.gold

I get a file with a .text section that looks like

 0x000000d0 2a000000 0000000a 0000000a 0000000a *...............
 0x000000e0 2a000000

Cheers,
Rafael


More information about the llvm-commits mailing list