binutils Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
cris

CRIS: Get machine type from output BFD, not dynamic object.

Updates the CRIS backend to retrieve machine type from the output BFD, removing a restriction related to dynamic object processing.

The CRIS backend in BFD previously relied on the dynamic object (dynobj) to determine the machine type in elf_cris_adjust_dynamic_symbol. This commit modifies the code to retrieve the machine type directly from the output BFD (info->output_bfd). As a result, a check related to dynobj in cris_elf_check_relocs is no longer needed and is removed, simplifying the code and removing a previous restriction.

In Details

In elf32-cris.c, the function elf_cris_adjust_dynamic_symbol is corrected to get the machine type from the output BFD instead of the dynamic object. This change allows simplified relocation handling and removes the need for the dynobj check in cris_elf_check_relocs. The machine type (bfd_mach_cris_v32) influences the PLT entry size, and this change ensures the correct value is used.

For Context

This commit concerns the CRIS architecture support within the Binary File Descriptor (BFD) library. The machine type influences how position independent code is created. Adjusting how the machine type affects code generation simplifies the code and removes a restriction.

Filed Under: bfdcriselflinkerdynamic object