Fix linking with latest gcc.

gas now adds a .note.gnu.property section to the object files. We
need to strip it out when building the binaries.
This commit is contained in:
Martin Whitaker 2021-07-18 20:41:31 +01:00
parent f1f6d4ecae
commit e7d22959ea
8 changed files with 12 additions and 2 deletions

View File

@ -15,6 +15,8 @@ SECTIONS {
*(.data)
_end = . ;
}
/DISCARD/ : { *(*) }
_sys_size = (_end - _start + 15) >> 4;
_init_size = (_end - _start) + _bss_size;
}

View File

@ -17,6 +17,7 @@ SECTIONS {
. = ALIGN(512);
_text_end = . ;
}
/DISCARD/ : { *(*) }
_text_size = (_text_end - _text_start);

View File

@ -12,5 +12,7 @@ SECTIONS {
*(.data)
_end = . ;
}
/DISCARD/ : { *(*) }
_sys_size = (_end - _start + 15) >> 4;
}

View File

@ -49,5 +49,5 @@ SECTIONS {
. = ALIGN(256);
_end = .;
}
/DISCARD/ : { *(*) }
/DISCARD/ : { *(*) }
}

View File

@ -15,6 +15,8 @@ SECTIONS {
*(.data)
_end = . ;
}
/DISCARD/ : { *(*) }
_sys_size = (_end - _start + 15) >> 4;
_init_size = (_end - _start) + _bss_size;
}

View File

@ -17,6 +17,7 @@ SECTIONS {
. = ALIGN(512);
_text_end = . ;
}
/DISCARD/ : { *(*) }
_text_size = (_text_end - _text_start);

View File

@ -12,5 +12,7 @@ SECTIONS {
*(.data)
_end = . ;
}
/DISCARD/ : { *(*) }
_sys_size = (_end - _start + 15) >> 4;
}

View File

@ -49,5 +49,5 @@ SECTIONS {
. = ALIGN(256);
_end = .;
}
/DISCARD/ : { *(*) }
/DISCARD/ : { *(*) }
}