[llvm-bugs] [Bug 45023] New: alignment change after D74736

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Feb 25 12:07:30 PST 2020


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

            Bug ID: 45023
           Summary: alignment change after D74736
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: scottmg at chromium.org
                CC: llvm-bugs at lists.llvm.org, smithp352 at googlemail.com

Created attachment 23168
  --> https://bugs.llvm.org/attachment.cgi?id=23168&action=edit
a.cc

Minimized-ish:

At clang/lld ToT (after https://reviews.llvm.org/D74736)

$ /tmp/dir/bin/clang++ -c a.cc -o a.o && /tmp/dir/bin/ld.lld x.ld a.o -o x &&
objdump -h x
ld.lld: warning: cannot find entry symbol _start; defaulting to 0x4

x:     file format elf64-x86-64

Sections:
Idx Name          Size      VMA               LMA               File off  Algn
  0 .rodata       00000004  0000000000000000  0000000000000000  00001000  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  1 .text         00000000  0000000000000004  0000000000000004  00001004  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  2 .data.rel.ro  00000028  0000000000000008  0000000000000008  00001008  2**4
                  CONTENTS, ALLOC, LOAD, DATA
  3 .comment      000000ff  0000000000000000  0000000000000000  00001030  2**0
                  CONTENTS, READONLY


vs. before https://reviews.llvm.org/D74736


$ prebuilt/third_party/clang/linux-x64/bin/clang++ -c a.cc -o a.o &&
prebuilt/third_party/clang/linux-x64/bin/ld.lld x.ld a.o -o x && objdump -h x
ld.lld: warning: cannot find entry symbol _start; defaulting to 0x4

x:     file format elf64-x86-64

Sections:
Idx Name          Size      VMA               LMA               File off  Algn
  0 .rodata       00000004  0000000000000000  0000000000000000  00001000  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  1 .text         00000000  0000000000000004  0000000000000004  00001004  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  2 .data.rel.ro  00000020  0000000000000010  0000000000000010  00001010  2**4
                  CONTENTS, ALLOC, LOAD, DATA
  3 .comment      000000ff  0000000000000000  0000000000000000  00001030  2**0
                  CONTENTS, READONLY

In particular, the VMA of .data.rel.ro has changed from a 16 aligned to 8
aligned.

-- 
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/20200225/2851fc70/attachment.html>


More information about the llvm-bugs mailing list