https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82501
--- Comment #22 from Andrey Drobyshev <a.drobyshev at samsung dot com> --- Created attachment 45851 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45851&action=edit Work-in-progress fix considering relocations I'm a bit stuck. I managed to precompute reloc value for the globals (the code for detect_reloc_for_node() is stealed from get_variable_section ()). I also succeded in putting dummy variable into .data.rel.ro by making a decl of a pointer type. But .data.rel is not working: checks from varasm.c:1173 and varasm.c:1197 are somewhat conflicting. Maybe you could find a way to overcome this?