<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - ld.lld reports "unsupported compression type" on big-endian objects"
   href="https://bugs.llvm.org/show_bug.cgi?id=51369">51369</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ld.lld reports "unsupported compression type" on big-endian objects
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>FreeBSD
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>ELF
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>emaste@freebsd.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, smithp352@googlemail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=25110" name="attach_25110" title="lld reproducer tarball">attachment 25110</a> <a href="attachment.cgi?id=25110&action=edit" title="lld reproducer tarball">[details]</a></span>
lld reproducer tarball

I attempted to build FreeBSD with -gz=zlib compressed debug. The big endian
targets (mips, powerpc) failed with errors like

ld  -o Scrt1.o -r Scrt1_c.o crtbrand.o feature_note.o ignore_init_note.o
ld: error: Scrt1_c.o:(.debug_loc): unsupported compression type
ld: error: Scrt1_c.o:(.debug_abbrev): unsupported compression type
ld: error: Scrt1_c.o:(.debug_info): unsupported compression type
ld: error: Scrt1_c.o:(.debug_str): unsupported compression type
ld: error: Scrt1_c.o:(.debug_line): unsupported compression type

readelf -S
usr/obj/usr/home/emaste/src/freebsd-git/main/mips.mips64/lib/csu/mips/Scrt1_c.o
There are 26 section headers, starting at offset 0x1b28:

Section Headers:
  [Nr] Name              Type             Address           Offset
       Size              EntSize          Flags  Link  Info  Align
...
  [12] .debug_loc        MIPS_DWARF       0000000000000000  00000460
       000000000000010e  0000000000000000   C       0     0     8
...
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)

$ readelf -x .debug_loc
usr/obj/usr/home/emaste/src/freebsd-git/main/mips.mips64/lib/csu/mips/Scrt1_c.o

Hex dump of section '.debug_loc':
  0x00000000 00000001 00000000 00000000 000003b4 ................
  0x00000010 00000000 00000001 789c6360 00031d08 ........x.c`....
  0x00000020 c5b08581 311cce84 803d0c2c 9f19c3e7 ....1....=.,....
  0x00000030 c3791070 02a1f004 84626440 51880e60 .y.p.....bd@Q..`
  0x00000040 36343030 8641993d 507a0a48 6318218d 6400.A.=Pz.Hc.!.
  0x00000050 40a78562 735a2816 a785c299 484e0b25 @..bsZ(.....HN.%
  0x00000060 c286106c 368460b1 2104ce44 b2210497 ...l6.`.!..D.!..
  0x00000070 0d117055 8c493894 38209424 e0378561 ..pU.I8.8 .$.7.a
  0x00000080 0e6e535c 10a624e2 505202a5 2b181883 .nS\..$.PR..+...
  0x00000090 a1cc0628 ddc2c05c 5c3f1fce 81800e84 ...(...\\?......
  0x000000a0 ba0eb803 90d4a101 461328ed 028f6846 ........F.(...hF
  0x000000b0 a8ab983c 70fa0dae cb031e79 40265c17 ...<p......y@&\.
  0x000000c0 0ebfc075 f9c02304 c884ebc2 11488c31 ...u..#......H.1
  0x000000d0 507a0603 9301d417 8c37a0da 44106218 Pz.......7..D.b.
  0x000000e0 fa5640e9 230c8c99 50e52a50 da012e84 .V@.#...P.*P....
  0x000000f0 0e98a089 86e906dc f34c1f20 34b301ce .........L. 4...
  0x00000100 f0601681 d21a580c 06000ef9 3a7b     .`....X.....:{</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>