[Patch] Don't declare all text sections at the start of the .s
Adrian Prantl
aprantl at apple.com
Thu Mar 19 09:15:33 PDT 2015
Here’s the whitelist function from the patch in case this catches anyone’s attention.
> + static bool canGoAfterDWARF(const MCSectionMachO &MSec) {
> + // These sections are created by the assembler itself after the end of
> + // the .s file.
> + StringRef SegName = MSec.getSegmentName();
> + StringRef SecName = MSec.getSectionName();
> +
> + if (SegName == "__LD" && SecName == "__compact_unwind")
> + return true;
> +
> + if (SegName == "__IMPORT") {
> + if (SecName == "__jump_table")
> + return true;
> +
> + if (SecName == "__pointers")
> + return true;
> + }
> +
> + if (SegName == "__TEXT" && SecName == "__eh_frame")
> + return true;
> +
> + if (SegName == "__DATA" && SecName == "__nl_symbol_ptr")
> + return true;
> +
> + return false;
> +}
-- adrian
More information about the llvm-commits
mailing list