[llvm-dev] [LLD] Slow callstacks in gdb

Rafael Avila de Espindola via llvm-dev llvm-dev at lists.llvm.org
Tue Dec 5 19:14:58 PST 2017


Rui Ueyama <ruiu at google.com> writes:

> Somewhat orthogonal to the original issue, but if object files are aligned
> only to two bytes in a static archive, and if we are using the four byte
> aligned load instruction on armv6 to load data from object files, that
> means current LLVM can easily cause a bus error on armv6, no?

We are not using a 4 byte aligned load. We are using:

>> the 2 byte aligned case is
>>
>>   ldrh    r1, [r0, #2]
>>   ldrh    r0, [r0]
>>   orr     r0, r0, r1, lsl #16

That is why the check for the section being at least 2 byte aligned is
important.

The 2 is from

  using Elf_Word = support::detail::packed_endian_specific_integral<
      uint32_t, target_endianness, 2>;

Cheers,
Rafael


More information about the llvm-dev mailing list