[PATCH v1] LoongArch: Fix relaxation alignment with ld -r (PR 33236)
Xi Ruoyao
xry111@xry111.site
Fri Jun 5 09:56:43 GMT 2026
On Fri, 2026-05-29 at 15:43 +0800, mengqinggang wrote:
> + /* Match if (r_symndx < symtab_hdr->sh_info) branch in
> + loongarch_elf_relocate_section to avoid find link failed. */
> + symtab_hdr->sh_info = 1;
> +// symtab_hdr->sh_size = sizeof (Elf_Internal_Sym);
> +// symtab_hdr->sh_entsize = sizeof (Elf_Internal_Sym);
> +// symtab_hdr->sh_type = SHT_SYMTAB;
> +// symtab_hdr->sh_addralign = (bfd_vma) 1 << bed->s->log_file_align;
Hmm, just remove them?
> + symtab_hdr->contents = (unsigned char *) sym;
I'll test if the change will break Linux kernel module this weekend.
--
Xi Ruoyao <xry111@xry111.site>
More information about the Binutils
mailing list