From: Michael F. <mf...@mf...> - 2021-05-01 20:52:56
|
Thanks for your response. My apologies for the empty subject. I hit send before realizing I forgot to write one. Joseph Koshy <jk...@us...> wrote: > > It appears that elftoolchain has a check[1] in gelf_update_rel[a] to > > make sure that the section header corresponding to the GElf_Data has > > the appropriate type, and it fails if not. > > Yes, its a sanity check - since using gelf_update_rel{,a}() by mistake > on data descriptors associated another section type could cause hard > to diagnose data corruption. > > Would it be possible to set the section type in your application > before using these functions? Unfortunately it is not my application, but a tool required to build the Linux kernel. I have written a patch[0] which fixes the issue, and I can try to submit it upstream. I agree that the sanity check is good in general, but I have to wonder if it makes sense to fail if the section type is just not yet set (SHT_NULL), since that does not necessarily indicate an application error. [0] https://github.com/oasislinux/linux/commit/85ca71562234d8e5743cfa241bc3f445b6cc9a05 |