[PATCH] D43942: [lld] Fix handling of output section selection for unmerged mergeable inputs and relocatable output

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 05:56:37 PDT 2019


MaskRay added a comment.

These lines were dropped by D67504 <https://reviews.llvm.org/D67504>:

  -  // When control reaches here, mergeable sections have already been merged into
  -  // synthetic sections. For relocatable case we want to create one output
  -  // section per syntetic section so that they have a valid sh_entsize.
  -  if (config->relocatable && (isec->flags & SHF_MERGE))
  -    return createSection(isec, outsecName);
  -

There is one .rodata.1 and one .debug_str in the -r output. It addresses @gbreynoo's problem. It drops the potential optimization of .rodata.1 with different entry sizes because the two .rodata.1 are now merged. I have explained in D67504 <https://reviews.llvm.org/D67504> that this is not too bad.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D43942/new/

https://reviews.llvm.org/D43942





More information about the llvm-commits mailing list