Skip to content

[ABI] Default to the medium code model across the board #43

@xen0n

Description

@xen0n

Large apps, such as Chromium, and potentially in-house services that are written in C++ and/or Rust and featuring huge polymorphic business logic, are going to have text sections larger than 256MiB, that the current default code model of normal cannot handle.

We could ask such devs to manually add -mcmodel=medium or even extreme to their projects, but the problem is: users rarely are aware of their own software's growth, and arguably they shouldn't care, and (IMO) it's definitely not the users' fault if their project suddenly fails to link just because one more feature is added that pushed the text section size over the tipping point.

Instead, I'd like to propose that we allow and implement the relaxation of call36 to bl, then effectively merge the normal and medium code models:

  • either make normal an alias of medium,
  • or switch the defaults to medium for popular toolchain projects,
  • or both.

This way, small programs' performance should stay the same thanks to relaxation, and larger programs should get transparently supported. And all of this without any user intervention. The 256GiB 4GiB text section and 4GiB data access range allowed by the medium code model should be enough for the foreseeable future; the extreme code model should be required only for advanced use cases and/or supercomputing.

Progress

Metadata

Metadata

Assignees

No one assigned

    Labels

    AREA: SpecsA proper fix would involve updating specification text and likely vendor cooperationAREA: Toolchain

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions