Skip to content
Commit 4fcadaf5 authored by Rui Ueyama's avatar Rui Ueyama
Browse files

ELF2: Merge .{text,rodata,data,bss}.* sections.

Previously, we used input section names as output section names.
That resulted that we created lots of sections for comdat
or -f{function,data}-section sections.

This patch reduces the number of sections by dropping suffix from
all section names which start with ".text.", ".rodata.", ".data."
or ".bss.". GNU linker does this using the internal linker script,
but for LLD I chose to do that directly.

Interestingly, this makes the linker faster. Time to link Clang
is this.

Before:

  real    0m0.537s
  user    0m0.433s
  sys     0m0.104s

After:

  real    0m0.390s
  user    0m0.268s
  sys     0m0.120s

It make sense because previously we created 57659 sections now only 27.

llvm-svn: 250315
parent a7f8f252
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment