)]}'
{
  "commit": "a5300c4949b8d4de2d34bedfaed66793f48ec948",
  "tree": "9ce60214f4b98422c2051405d5ab7744aea1db47",
  "parents": [
    "de50b5931c08f5fba7039ddccfb249a5b3b0b18d"
  ],
  "author": {
    "name": "Sven Eckelmann",
    "email": "sven@narfation.org",
    "time": "Fri May 22 09:36:52 2020 +0200"
  },
  "committer": {
    "name": "Paolo Bonzini",
    "email": "bonzini@gnu.org",
    "time": "Fri May 22 09:51:42 2020 +0200"
  },
  "message": "qboot: Disable PIE for ELF binary build step\n\nThe switch to meson in commit fd2aada36b98 (\"Add meson build\") had two\nmajor behavior changes for the ELF binary build step:\n\n* ELF binary is no longer build as x86_64 on x86_64\n* ELF binary is build as position independent executable on systems with a\n  \"--enable-default-pie\" gcc\n\nThe latter will create a slightly larger than 64KB bios.bin which causes an\nerror when Qemu tries to load it:\n\n  qemu: could not load PC BIOS \u0027qboot/build/bios.bin\u0027\n\nThis behavior change was introduced because the elf linker step was changed\nfrom using ld directly to using cc. Basically something like following\nMakefile change:\n\n   bios.bin.elf: $(obj-y) flat.lds\n  -        $(LD) -T flat.lds -o bios.bin.elf $(obj-y)\n  +        $(CC) -o bios.bin.elf $(obj-y) -Wl,--no-undefined -Wl,--as-needed -nostdlib -m32 -Wl,--build-id\u003dnone -Wl,-Tflat.lds\n\nGCC will then take care of calling ld with the appropriate arguments. And\none of these arguments for the \"--enable-default-pie\" gcc is \"-pie\":\n\n  $(LD) --build-id --eh-frame-hdr -m elf_i386 --hash-style\u003dgnu -dynamic-linker /lib/ld-linux.so.2 -pie -o bios.bin.elf $(obj-y) --no-undefined --as-needed --build-id\u003dnone -Tflat.lds\n\nThis default behavior of gcc must be suppressed by adding -no-pie to the\narguments when linking the object files.\n\nSigned-off-by: Sven Eckelmann \u003csven@narfation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2aef8c9eaab5df334aa938f83de222b1d78ed78f",
      "old_mode": 33188,
      "old_path": "meson.build",
      "new_id": "d060f756e136d0ae5f168d210b8b15d315a1503e",
      "new_mode": 33188,
      "new_path": "meson.build"
    }
  ]
}
