[all-commits] [llvm/llvm-project] 8bbeed: [libc] [startup] add cmake function to merge separ...

Schrodinger ZHU Yifan via All-commits all-commits at lists.llvm.org
Wed Dec 20 08:19:04 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8bbeed05c4da832a2abf532fee8665c0d6576cbc
      https://github.com/llvm/llvm-project/commit/8bbeed05c4da832a2abf532fee8665c0d6576cbc
  Author: Schrodinger ZHU Yifan <yifanzhu at rochester.edu>
  Date:   2023-12-20 (Wed, 20 Dec 2023)

  Changed paths:
    M libc/startup/linux/CMakeLists.txt

  Log Message:
  -----------
  [libc] [startup] add cmake function to merge separated crt1 objects (#75413)

As part of startup refactoring, this patch adds a function to merge
multiple objects into a single relocatable object:
                     cc -r obj1.o obj2.o -o obj.o

A relocatable object is an object file that is not fully linked into an
executable or a shared library. It is an intermediate file format that
can be passed into the linker.

A crt object can have arch-specific code and arch-agnostic code. To
reduce code cohesion, the implementation is splitted into multiple
units. As a result, we need to merge them into a single relocatable
object.




More information about the All-commits mailing list