diff options
author | Maciej W. Rozycki <macro@mips.com> | 2018-02-19 18:38:41 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@mips.com> | 2018-02-19 18:38:41 +0000 |
commit | 8772de117d8366988bc60c9f9c571e262ef75932 (patch) | |
tree | 2ecb85a275d6db8cc6936f7070fa40ba11238bc8 /bfd | |
parent | 4f7fd351a727ffc44d3dd4e00ddf5222cd2063c5 (diff) | |
download | fsf-binutils-gdb-8772de117d8366988bc60c9f9c571e262ef75932.zip fsf-binutils-gdb-8772de117d8366988bc60c9f9c571e262ef75932.tar.gz fsf-binutils-gdb-8772de117d8366988bc60c9f9c571e262ef75932.tar.bz2 |
LD: Support fixed-size sections some psABIs may require
Define a SEC_FIXED_SIZE section flag for target backends to use for
output sections whose size has been fixed in the psABI. The size of
such sections will not be changed anyhow by the generic linker and it is
up to the target backend to get their size right.
bfd/
* section.c (SEC_FIXED_SIZE): New macro.
* bfd-in2.h: Regenerate.
ld/
* ldlang.c (insert_pad): Do not change output section's size if
SEC_FIXED_SIZE is set in the flags.
(size_input_section): Likewise.
(lang_size_sections_1): Likewise.
(lang_reset_memory_regions): Likewise.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 5 | ||||
-rw-r--r-- | bfd/section.c | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e4c33c7..b84a3d1 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2018-02-19 Maciej W. Rozycki <macro@mips.com> + * section.c (SEC_FIXED_SIZE): New macro. + * bfd-in2.h: Regenerate. + +2018-02-19 Maciej W. Rozycki <macro@mips.com> + * section.c (SEC_HAS_GOT_REF): Remove macro. * bfd-in2.h: Regenerate. diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 2901488..9742c1a 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1342,6 +1342,11 @@ typedef struct bfd_section /* The section contains thread local data. */ #define SEC_THREAD_LOCAL 0x400 + /* The section's size is fixed. Generic linker code will not + recalculate it and it is up to whoever has set this flag to + get the size right. */ +#define SEC_FIXED_SIZE 0x800 + /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one diff --git a/bfd/section.c b/bfd/section.c index de4ca3a..6aa18d5 100644 --- a/bfd/section.c +++ b/bfd/section.c @@ -221,6 +221,11 @@ CODE_FRAGMENT . {* The section contains thread local data. *} .#define SEC_THREAD_LOCAL 0x400 . +. {* The section's size is fixed. Generic linker code will not +. recalculate it and it is up to whoever has set this flag to +. get the size right. *} +.#define SEC_FIXED_SIZE 0x800 +. . {* The section contains common symbols (symbols may be defined . multiple times, the value of a symbol is the amount of . space it requires, and the largest symbol value is the one |