Thanks for your response. My apologies for the empty subject. I hit
send before realizing I forgot to write one.

Joseph Koshy <jko...@users.sourceforge.net> 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


_______________________________________________
Elftoolchain-developers mailing list
Elftoolchain-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/elftoolchain-developers

Reply via email to