https://llvm.org/bugs/show_bug.cgi?id=25837
Bug ID: 25837 Summary: Absent alignment field in .comm differs from GAS Product: libraries Version: trunk Hardware: All OS: All Status: NEW Severity: normal Priority: P Component: MC Assignee: unassignedb...@nondot.org Reporter: dan433...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified The interpretation of an absent alignment field in .comm (and .lcomm) directives in llvm-mc differs from GAS: $ cat comm.s .comm foo,256 $ as comm.s -o comm.o $ readelf -sW comm.o |grep foo 4: 0000000000000010 256 OBJECT GLOBAL DEFAULT COM foo $ llvm-mc -filetype=obj -o comm.o comm.s $ readelf -sW comm.o |grep foo 1: 0000000000000001 256 OBJECT GLOBAL DEFAULT COM foo Note that for COMMON symbols, the Value field holds the alignment, so it's 16 for GAS here and 1 for llvm-mc. The GAS behavior is documented on this page: https://sourceware.org/binutils/docs/as/Comm.html#Comm "If no alignment is specified, as will set the alignment to the largest power of two less than or equal to the size of the symbol, up to a maximum of 16 on ELF, or the default section alignment of 4 on PE." -- 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