[llvm-bugs] [Bug 51369] New: ld.lld reports "unsupported compression type" on big-endian objects

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 5 18:09:47 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=51369

            Bug ID: 51369
           Summary: ld.lld reports "unsupported compression type" on
                    big-endian objects
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: emaste at freebsd.org
                CC: llvm-bugs at lists.llvm.org, smithp352 at googlemail.com

Created attachment 25110
  --> https://bugs.llvm.org/attachment.cgi?id=25110&action=edit
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 at 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 at .#...P.*P....
  0x000000f0 0e98a089 86e906dc f34c1f20 34b301ce .........L. 4...
  0x00000100 f0601681 d21a580c 06000ef9 3a7b     .`....X.....:{

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210806/b9ae41f4/attachment.html>


More information about the llvm-bugs mailing list