This is an archive of the discontinued LLVM Phabricator instance.

[ELF][gcc compatibility]: support section names with special characters (e.g. "/")
ClosedPublic

Authored by myatsina on Dec 20 2015, 8:15 AM.

Details

Summary

Adding support for section names withspecial characters in them (e.g. "/") .
GCC successfully compiles such section names.
This also fixes PR24520.

Diff Detail

Repository
rL LLVM

Event Timeline

myatsina updated this revision to Diff 43331.Dec 20 2015, 8:15 AM
myatsina retitled this revision from to [ELF][gcc compatibility]: support section names with "/".
myatsina updated this object.
myatsina added a reviewer: rafael.
myatsina set the repository for this revision to rL LLVM.
myatsina added a subscriber: Restricted Project.
myatsina edited subscribers, added: llvm-commits; removed: Restricted Project.
majnemer added inline comments.Jan 11 2016, 8:24 AM
lib/MC/MCParser/ELFAsmParser.cpp
233–248

GNU as's behavior seems to be the following: the section name is either exactly one quoted string OR it is anything other than a newline,tab,comma or semicolon.

myatsina updated this revision to Diff 50959.Mar 17 2016, 11:03 AM
myatsina removed rL LLVM as the repository for this revision.

Adding support for additional special characters in the section name

rafael added inline comments.Mar 17 2016, 2:44 PM
test/MC/ELF/section.s
16

Missing check for ~!@$%^&*()_-+={[}]|\\:<>

myatsina updated this revision to Diff 51107.Mar 19 2016, 3:15 AM
myatsina retitled this revision from [ELF][gcc compatibility]: support section names with "/" to [ELF][gcc compatibility]: support section names with special characters (e.g. "/").
myatsina updated this object.
myatsina set the repository for this revision to rL LLVM.

Added missing check

rafael accepted this revision.Mar 21 2016, 5:23 AM
rafael edited edge metadata.

LGTM

This revision is now accepted and ready to land.Mar 21 2016, 5:23 AM
This revision was automatically updated to reflect the committed changes.