This is an archive of the discontinued LLVM Phabricator instance.

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

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

Details

Summary

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.

[1] https://bugs.llvm.org/show_bug.cgi?id=43119

Fix PR43119.

Diff Detail

Event Timeline

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