Hi Alan, > On Fri, Feb 14, 2020 at 10:30:47AM +0000, Nick Clifton wrote: >> As part of this process I also discovered that the BFD library would >> unconditionally convert OS-specific and PROC-specific section indices >> into SHN_ABS indices when writing out symbol tables, > That sounds like a bug that should be fixed for all ELF targets and > not via a target hook. I have checked in this patch to resolve this particular problem. I do not think that the code has to worry about the sign extension of the special values as this has been handled by the definitions in elf/internal.h. Cheers Nick bfd/ChangeLog 2020-02-20 Nick Clifton * elf-bfd.h (struct elf_backend_data): Add symbol_section_index callback. * elfxx-target.h (elf_backend_symbol_section_index): Provide default definition. (elfNN_bed): Initialise the symbol_section_index field. * elf.c (swap_out_syms): Call symbol_section_index, if defined, on OS and PROC specific section indicies. Warn if converting other reserved incidies to SHN_ABS.