llvm-project/lld/docs/ELF
Fangrui Song 66f8ac8d36 [ELF] Support (TYPE=<value>) to customize the output section type
The current output section type allows to set the ELF section type to
SHT_PROGBITS or SHT_NOLOAD. This patch allows an arbitrary section value
to be specified. Some common SHT_* literal names are supported as well.

```
SECTIONS {
  note (TYPE=SHT_NOTE) : { BYTE(8) *(note) }
  init_array ( TYPE=14 ) : { QUAD(14) }
  fini_array (TYPE = SHT_FINI_ARRAY) : { QUAD(15) }
}
```

When `sh_type` is specified, it is an error if an input section has a different type.

Our syntax is compatible with GNU ld 2.39 (https://sourceware.org/bugzilla/show_bug.cgi?id=28841).

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D118840
2022-02-17 12:10:58 -08:00
..
linker_script.rst [ELF] Support (TYPE=<value>) to customize the output section type 2022-02-17 12:10:58 -08:00
start-stop-gc.rst [ELF] Hint -z nostart-stop-gc for __start_ undefined references 2021-12-02 11:58:25 -08:00
warn_backrefs.rst [ELF][docs] Add line breaks 2021-03-22 16:08:47 +08:00