m.f> Alternatively, an arguably better check is to make sure the Elf_Data
m.f> has d_type == ELF_T_REL(A). What are your thoughts on that?

The suggested change looks cleaner at the first glance, but is also a
change that could break existing code.

This is because elf_newdata(3) initializes the 'd_type' field of the
returned Elf_Data descriptor to 'ELF_T_BYTE'.  Applications do need to
override this value eventually, but can currently do so any time
before the call to elf_update(3).

With this change applications would need to set 'd_type' before
calling the gelf_update_rel{,a}() APIs, which is a new behavioral
requirement.

-- 
Joseph Koshy | Volunteer Developer, The Elftoolchain Project


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

Reply via email to