)]}'
{
  "commit": "029e52bac7f3a6dd8b39f7f3d298b73174da806b",
  "tree": "a094b4ff73593732976a9ab32d2f1f70f1daab0e",
  "parents": [
    "9fdd490b6bff83e6a436e670517fa633d302ad57"
  ],
  "author": {
    "name": "Xi Ruoyao",
    "email": "xry111@xry111.site",
    "time": "Fri Feb 02 21:00:58 2024 +0800"
  },
  "committer": {
    "name": "liuzhensong",
    "email": "liuzhensong@loongson.cn",
    "time": "Sun Feb 04 11:23:49 2024 +0800"
  },
  "message": "LoongArch: gas: Fix the types of symbols referred with %le_*_r in the symtab\n\nWhen a symbol is referred with %le_{hi20,lo12,add}_r, it\u0027s definitely a\nTLS symbol and we should set its type to TLS in the symtab.  Otherwise\nwhen building Perl with gcc-14 -flto, we get:\n\n/usr/bin/ld: PL_current_context: TLS definition in\n./miniperl.ltrans0.ltrans.o section .tbss mismatches non-TLS reference\nin ./miniperl.ltrans1.ltrans.o\n\nA minimal reproducer:\n\n    $ cat t1.s\n    .section .tbss\n    .globl x\n    x: .word 0\n    $ cat t2.s\n    f:\n      lu12i.w $a0, %le_hi20_r(x)\n      add.d   $a0, $a0, $tp, %le_add_r(x)\n      li.w    $a1, 1\n      st.w    $a1, $a0, %le_lo12_r(x)\n    $ gas/as-new t1.s -o t1.o\n    $ gas/as-new t2.s -o t2.o\n    $ ld/ld-new t1.o t2.o\n    ld/ld-new: x: TLS definition in t1.o section .tbss mismatches\n    non-TLS reference in t2.o\n\nUnfortunately this was undetected before Binutils-2.42 release because\nGCC \u003c 14 does not use %le_*_r, and without LTO it\u0027s very rare to have a\nTLS LE definition and its reference in two different translation units.\nSo this fix should be backported to Binutils-2.42 branch too.\n\nSigned-off-by: Xi Ruoyao \u003cxry111@xry111.site\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e0aff36bbbbec9a3fcc02645fde8014c4cc37366",
      "old_mode": 33188,
      "old_path": "gas/config/tc-loongarch.c",
      "new_id": "91f5f1d068139deec931d50aac3e2e8212be2d6f",
      "new_mode": 33188,
      "new_path": "gas/config/tc-loongarch.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "43bcd789769a6cfe0f7bb2bc6a977a6489917f6b",
      "new_mode": 33188,
      "new_path": "gas/testsuite/gas/loongarch/tls_le_r_sym_type.d"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3ccedae921f0fa14d49438bc5bc619304ce76272",
      "new_mode": 33188,
      "new_path": "gas/testsuite/gas/loongarch/tls_le_r_sym_type.s"
    }
  ]
}
