Skip to content

Commit

Permalink
Remove --encoded-package-metadata from docs
Browse files Browse the repository at this point in the history
It's not clear whether or not the option would be added to the GNU linker,
so I"ll make this a hidden option for now.

#1308
  • Loading branch information
rui314 committed Aug 6, 2024
1 parent 43d9536 commit 0bf00a4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
13 changes: 0 additions & 13 deletions docs/mold.md
Original file line number Diff line number Diff line change
Expand Up @@ -629,19 +629,6 @@ but as `-o magic`.
shared libraries linked with `--pack-dyn-relocs=relr`. As of 2022, only
ChromeOS, Android and Fuchsia support it.

* `--package-metadata`=_string_, `--encoded-package-metadata`=_string_:
Embed _string_ to a `.note.package` section. This option is intended to be
used by a package management command such as rpm(8) to embed metadata
regarding a package to each executable file.

The difference between `--package-metadata` and `--encoded-package-metadata`
is that the former takes a plain string while the latter takes a
percent-encoded string. In other words, `--package-metadata={"foo":"bar"}`
is equivalent to `--encoded-package-metadata=%7B%22foo%22%3A%22bar%22%7D`.
The latter option is useful to use with the compiler's `-Wl,` option because
you can escape commas in a JSON string, which would otherwise be interpreted
as an argument separator by the compiler.

* `--pie`, `--pic-executable`, `--no-pie`, `--no-pic-executable`:
Create a position-independent executable.

Expand Down
2 changes: 0 additions & 2 deletions elf/cmdline.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ inline const char helpmsg[] = R"(
--oformat=binary Omit ELF, section, and program headers
--pack-dyn-relocs=[relr,none]
Pack dynamic relocations
--encoded-package-metadata=PERCENT_ENCODED_STRING
Set a given string to .note.package
--package-metadata=STRING Set a given string to .note.package
--perf Print performance statistics
--pie, --pic-executable Create a position-independent executable
Expand Down

0 comments on commit 0bf00a4

Please sign in to comment.