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

            Bug ID: 36203
           Summary: lld may create duplicate .build-id's
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: ELF
          Assignee: unassignedb...@nondot.org
          Reporter: r...@google.com
                CC: llvm-bugs@lists.llvm.org

If a build-id is included in an input object file, lld may adds a new one, and
as a result, the output contains more than one .build-id. Most tools don't
expect such executables and don't work well.

This is a test case to create an executable with two .build-id's.

We probably should strip .build-id sections from input files if --build-id is
specified.

# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
# RUN: ld.lld --build-id=0xcafebabe -o %t2.o %t1.o
# RUN: ld.lld --build-id=0xdeadbeef -o %t.exe %t2.o
# RUN: llvm-objdump -s %t.exe | FileCheck %s

# CHECK-NOT: cafebabe

.global _start
_start:
  ret

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to