Skip to content

CommonELFSection should override getOldInputFile #1300

Description

@parth-07

Currently, we assign common symbols an internal input file and store the original input in CommonELFSection::Origin. We then use CommonELFSection::getOrigin for rule-matching, printing the filename in the diagnostics, and so on. Instead of creating a new member function in CommonELFSection and adding an if-condition on every path which requires the input filename of the section, we can reuse the already existing virtual function in the base class ELFSection, getOldInputFile, and use this instead for retrieving the original input file of the CommonELFSections. Wen can (and should) reuse getOldInputFile because it follows the same/similar semantics as of CommonELFSection::getOrigin. For example, old input file must be used for rule-matching and printing the input file name in the diagnostics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions