Message ID | 20210804000339.956188-1-joel@jms.id.au |
---|---|
State | Accepted |
Headers | show |
Series | template: Remove unused symbols | expand |
On Wed, 2021-08-04 at 09:33 +0930, Joel Stanley wrote: > There are no users of the _end or _size symbols. > > By dropping them we can also avoid unaligned data warnings: > > ./template.S: Assembler messages: > ./template.S:21: Error: misaligned data > > Reported by the buildroot autobuilder when building for sh. > > Signed-off-by: Joel Stanley <joel@jms.id.au> > --- > template.S | 7 ------- > 1 file changed, 7 deletions(-) > > diff --git a/template.S b/template.S > index ecf9bba0656d..9d0e6285a0c4 100644 > --- a/template.S > +++ b/template.S > @@ -9,16 +9,9 @@ > #define CONCAT2(a, b, c, d) a ## b ## c ## d > > #define SYM_START(x) CONCAT1(__USER_LABEL_PREFIX__, _binary_, x, > _start) > -#define SYM_END(x) CONCAT1(__USER_LABEL_PREFIX__, _binary_, x, > _end) > -#define SYM_SIZE(x) CONCAT1(__USER_LABEL_PREFIX__, _binary_, x, > _size) > > .section .data > .align 8 > SYM_START(SYMBOL_PREFIX): > .incbin FILENAME > -SYM_END(SYMBOL_PREFIX): > -SYM_SIZE(SYMBOL_PREFIX): > - .long SYM_END(SYMBOL_PREFIX) - SYM_START(SYMBOL_PREFIX) > .globl SYM_START(SYMBOL_PREFIX) > -.globl SYM_END(SYMBOL_PREFIX) > -.globl SYM_SIZE(SYMBOL_PREFIX) > -- > 2.32.0 > It might be a good idea to drop the export of now extinct symbols from generate_dt_header.h. Amitay.
diff --git a/template.S b/template.S index ecf9bba0656d..9d0e6285a0c4 100644 --- a/template.S +++ b/template.S @@ -9,16 +9,9 @@ #define CONCAT2(a, b, c, d) a ## b ## c ## d #define SYM_START(x) CONCAT1(__USER_LABEL_PREFIX__, _binary_, x, _start) -#define SYM_END(x) CONCAT1(__USER_LABEL_PREFIX__, _binary_, x, _end) -#define SYM_SIZE(x) CONCAT1(__USER_LABEL_PREFIX__, _binary_, x, _size) .section .data .align 8 SYM_START(SYMBOL_PREFIX): .incbin FILENAME -SYM_END(SYMBOL_PREFIX): -SYM_SIZE(SYMBOL_PREFIX): - .long SYM_END(SYMBOL_PREFIX) - SYM_START(SYMBOL_PREFIX) .globl SYM_START(SYMBOL_PREFIX) -.globl SYM_END(SYMBOL_PREFIX) -.globl SYM_SIZE(SYMBOL_PREFIX)
There are no users of the _end or _size symbols. By dropping them we can also avoid unaligned data warnings: ./template.S: Assembler messages: ./template.S:21: Error: misaligned data Reported by the buildroot autobuilder when building for sh. Signed-off-by: Joel Stanley <joel@jms.id.au> --- template.S | 7 ------- 1 file changed, 7 deletions(-)