[NFC] Update comment explaining linker_phdr function return codes
Looks like we all copy-pasted the same comment, and the original comment was wrong. These functions all return 0 on success, and -1 on error.
Change-Id: I11e635e0895fe1fa941d69b721b8ad9ff5eb7f15
Test: N/A
Bug: N/A
diff --git a/linker/linker_phdr.cpp b/linker/linker_phdr.cpp
index 97ae709..0ad0fd5 100644
--- a/linker/linker_phdr.cpp
+++ b/linker/linker_phdr.cpp
@@ -849,7 +849,7 @@
* load_bias -> load bias
* prop -> GnuPropertySection or nullptr
* Return:
- * 0 on error, -1 on failure (error code in errno).
+ * 0 on success, -1 on failure (error code in errno).
*/
int phdr_table_protect_segments(const ElfW(Phdr)* phdr_table, size_t phdr_count,
ElfW(Addr) load_bias, const GnuPropertySection* prop __unused) {
@@ -876,7 +876,7 @@
* phdr_count -> number of entries in tables
* load_bias -> load bias
* Return:
- * 0 on error, -1 on failure (error code in errno).
+ * 0 on success, -1 on failure (error code in errno).
*/
int phdr_table_unprotect_segments(const ElfW(Phdr)* phdr_table,
size_t phdr_count, ElfW(Addr) load_bias) {
@@ -939,7 +939,7 @@
* phdr_count -> number of entries in tables
* load_bias -> load bias
* Return:
- * 0 on error, -1 on failure (error code in errno).
+ * 0 on success, -1 on failure (error code in errno).
*/
int phdr_table_protect_gnu_relro(const ElfW(Phdr)* phdr_table,
size_t phdr_count, ElfW(Addr) load_bias) {
@@ -957,7 +957,7 @@
* fd -> writable file descriptor to use
* file_offset -> pointer to offset into file descriptor to use/update
* Return:
- * 0 on error, -1 on failure (error code in errno).
+ * 0 on success, -1 on failure (error code in errno).
*/
int phdr_table_serialize_gnu_relro(const ElfW(Phdr)* phdr_table,
size_t phdr_count,
@@ -1005,7 +1005,7 @@
* fd -> readable file descriptor to use
* file_offset -> pointer to offset into file descriptor to use/update
* Return:
- * 0 on error, -1 on failure (error code in errno).
+ * 0 on success, -1 on failure (error code in errno).
*/
int phdr_table_map_gnu_relro(const ElfW(Phdr)* phdr_table,
size_t phdr_count,
@@ -1102,7 +1102,7 @@
* arm_exidx -> address of table in memory (null on failure).
* arm_exidx_count -> number of items in table (0 on failure).
* Return:
- * 0 on error, -1 on failure (_no_ error code in errno)
+ * 0 on success, -1 on failure (_no_ error code in errno)
*/
int phdr_table_get_arm_exidx(const ElfW(Phdr)* phdr_table, size_t phdr_count,
ElfW(Addr) load_bias,