[yaml2obj] - Fix .dynamic section entries writing for 32bit targets.
authorGeorge Rimar <grimar@accesssoftek.com>
Sun, 10 Feb 2019 08:35:38 +0000 (08:35 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Sun, 10 Feb 2019 08:35:38 +0000 (08:35 +0000)
commit5cb317315cb7bf96cfa6a0300f9ba6f9188c7f2a
tree137cb071e2b69f9ddca0dd55ccfb8efac84ad63c
parent9ac13a12443b24e877e2b2cee128bdd41e3d67c8
[yaml2obj] - Fix .dynamic section entries writing for 32bit targets.

This was introduced by me in r353613.

I tried to fix Big-endian bot and replaced
uintX_t -> ELFT::Xword. But ELFT::Xword is a packed<uint64_t>,
so it is always 8 bytes and that was obviously incorrect.

My intention was to use something like packed<uint> actually, which
size is target dependent.

Patch fixes this bug and adds a test case, since no bots seems reported this.

llvm-svn: 353636
llvm/test/tools/yaml2obj/dynamic-section-i386.test [new file with mode: 0644]
llvm/tools/yaml2obj/yaml2elf.cpp