https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82005

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
That is, looking for documentation on Mach-O I find in mach-o/reloc.h

 * Another type of generic relocation, GENERIC_RELOC_SECTDIFF, is to support
 * the difference of two symbols defined in different sections.  That is the
 * expression "symbol1 - symbol2 + constant" is a relocatable expression when
 * both symbols are defined in some section.  For this type of relocation the
 * both relocations entries are scattered relocation entries.  The value of
 * symbol1 is stored in the first relocation entry's r_value field and the
 * value of symbol2 is stored in the pair's r_value field.

which I thought would apply here.  Looks like this doesn't work for UNDEFs
for some weird reason?

Note all of these relocations are resolvable by the link editor.

Reply via email to