Page MenuHomePhabricator

[mips] Switch to the `.text` section after emitting asm file preamble

Authored by atanasyan on Fri, Aug 30, 11:09 AM.



Now the last .section directive in the MIPS asm file preamble is the .section .mdebug.abi. If assembler code injected for example by the LLVM module asm or the C __asm directives do not contain explicit switching to the .text section it goes to the .mdebug.abi section. It might be unexpected to the user and in fact for example breaks building some existing code like FreeBSD libc [1].

The patch forces switching to the .text section after emitting MIPS assembler file preamble.


Fix PR43119.

Diff Detail


Event Timeline

atanasyan created this revision.Fri, Aug 30, 11:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptFri, Aug 30, 11:09 AM
This revision is now accepted and ready to land.Mon, Sep 2, 9:53 AM
This revision was automatically updated to reflect the committed changes.