mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-09 17:02:22 +08:00
PR ld/10744
* ldlang.c (lang_new_phdr): Allow FILEHDR/PHDRS on more than the first PT_LOAD header. * ld.texinfo: Update.
This commit is contained in:
@ -6779,9 +6779,11 @@ lang_new_phdr (const char *name,
|
||||
hdrs = n->type == 1 && (phdrs || filehdr);
|
||||
|
||||
for (pp = &lang_phdr_list; *pp != NULL; pp = &(*pp)->next)
|
||||
if (hdrs && (*pp)->type == 1)
|
||||
if (hdrs
|
||||
&& (*pp)->type == 1
|
||||
&& !((*pp)->filehdr || (*pp)->phdrs))
|
||||
{
|
||||
einfo (_("%X%P:%S: PHDRS and FILEHDR are only permitted for the first PT_LOAD segment\n"));
|
||||
einfo (_("%X%P:%S: PHDRS and FILEHDR are not supported when prior PT_LOAD headers lack them\n"));
|
||||
hdrs = FALSE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user