[PATCH] D41978: Allow unaligned access to ELF file data structures.
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 12 08:18:59 PST 2018
Rui Ueyama via Phabricator <reviews at reviews.llvm.org> writes:
> Index: llvm/include/llvm/Object/ELFTypes.h
> ===================================================================
> --- llvm/include/llvm/Object/ELFTypes.h
> +++ llvm/include/llvm/Object/ELFTypes.h
> @@ -44,7 +44,7 @@
> template <endianness E, bool Is64> struct ELFType {
> private:
> template <typename Ty>
> - using packed = support::detail::packed_endian_specific_integral<Ty, E, 2>;
> + using packed = support::detail::packed_endian_specific_integral<Ty, E, 1>;
>
> public:
> static const endianness TargetEndianness = E;
>
>
There are more uses of packed_endian_specific_integral in that
file. Probably the best way to fix this is to introduce a template
unaligned<T,E> = packed_endian_specific_integral<T, E, 1> and replace
all direct uses of packed_endian_specific_integral in that file.
Cheers,
Rafael
More information about the llvm-commits
mailing list