]> git.ipfire.org Git - thirdparty/elfutils.git/commit
Do without union of variable length arrays.
authorChih-Hung Hsieh <chh@google.com>
Tue, 6 Oct 2015 22:53:15 +0000 (15:53 -0700)
committerMark Wielaard <mjw@redhat.com>
Wed, 7 Oct 2015 20:44:41 +0000 (22:44 +0200)
commit7eff36d5daa6ebca5e6399638a7643af105ae5b0
tree7bfd9c4a93f88135b9f42337d827948aa6b63cdb
parentdaee4714ee3761e2d92f764a724e83875a79a3f0
Do without union of variable length arrays.

Prepare to compile with clang.

A union like
  { T32 a32[n]; T64 a64[n]; } u;
is expanded to
  size_t nbytes = n * MAX(sizeof(T32), sizeof(T64));
  void *data = malloc(nbytes);
  T32 (*a32)[n] = data;
  T64 (*a64)[n] = data;

Signed-off-by: Chih-Hung Hsieh <chh@google.com>
libdwfl/ChangeLog
libdwfl/dwfl_module_getdwarf.c
libdwfl/dwfl_segment_report_module.c
libdwfl/elf-from-memory.c
libdwfl/link_map.c
libelf/ChangeLog
libelf/elf_getarsym.c
src/ChangeLog
src/readelf.c
src/unstrip.c