Some of our test cases are using objects which
has sections with a broken sh_offset field.
There was no way to set it from YAML until this patch.
Differential D63879
[yaml2obj] - Allow overriding sh_offset field from the YAML. grimar on Jun 27 2019, 7:04 AM. Authored by
Details Some of our test cases are using objects which There was no way to set it from YAML until this patch.
Diff Detail
Event TimelineComment Actions I'm not sure the correct behaviour for an explicit offset is clear-cut. I'd think that it causes the section contents to be written at the specified offset, not that it just writes an arbitrary value in sh_offset. I've had times when I want to put my sections at a specific offset, but could only do this with tricks to do with alignment or padding sections. I'd expect an Offset field would resolve this issue (note that this is what happens for ProgramHeaders already). Unfortunately, I think this change conflicts with that desire, and I don't see any easy way of reconciling the differences.
Comment Actions Yes, I had the same concerns. But I think it is fine generally: at any time we still can introduce a new field that might have a behavior you describe. Comment Actions Okay, I can buy that, but this needs clear comments in the code, stating that this does NOT place the section data at the specified offset.
Comment Actions LGTM, with the comment fix.
|