Added a test for the broken behavior and fixed size field in newly added sections.
Test Plan:
in
cd ~/local/toolchain_dev/build/Release/Linux-x86_64/toolchain # run:
ninja check-llvm-tools-llvm-objcopy # run all tests for objcopy
ninja check-llvm # run all LLVM tests ... it's good practice
I'd also add a test for adding two new sections into two different segments.
There's a couple of more tests for --add-section that would be good to have, but fall outside the scope of this diff (they're better suited for add-section-error.test). I'm also note sure what the desired behavior for them is (maybe @alexshap would know):