Currently we get a wrong fixed value for R_RBR relocations when -ffunction-sections enabled. This patch fixes this.
4c: 4b ff ff f5 bl 0x40 <.bar> 0000004c: R_RBR .foo 50: 60 00 00 00 nop 54: 4b ff ff ed bl 0x40 <.bar> 00000054: R_RBR .static_overalign_foo 58: 60 00 00 00 nop 5c: 4b ff ff e5 bl 0x40 <.bar> 0000005c: R_RBR .alias_foo 60: 60 00 00 00 nop 64: 4b ff ff dd bl 0x40 <.bar> 00000064: R_RBR .extern_foo 68: 60 00 00 00 nop 6c: 4b ff ff d5 bl 0x40 <.bar> 0000006c: R_RBR .hidden_foo
Is it possible that the XCOFF::RelocationType::R_RBR is generated for a non XMC_PR type symbol? Maybe we should make it as an assertion here for both SymASec and ParentSec?