diff options
| author | skrll <skrll@NetBSD.org> | 2006-04-17 07:05:17 +0000 |
|---|---|---|
| committer | skrll <skrll@NetBSD.org> | 2006-04-17 07:05:17 +0000 |
| commit | c0d9bc63a5070e8f7c686efbbf960cc9876c0610 (patch) | |
| tree | d5f12e3926e5b2a02eabff4d0049c5ebc1cbb9c7 /gnu/dist/binutils | |
| parent | 683ccd8e40b55b575c23a1f927d7435e327c1c69 (diff) | |
Check that a .rodata section description has been provided before putting
orphan sections in it.
Closes PR/33129.
Diffstat (limited to 'gnu/dist/binutils')
| -rw-r--r-- | gnu/dist/binutils/ld/emultempl/elf32.em | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/dist/binutils/ld/emultempl/elf32.em b/gnu/dist/binutils/ld/emultempl/elf32.em index a5e6739e3fd..8d3af41e744 100644 --- a/gnu/dist/binutils/ld/emultempl/elf32.em +++ b/gnu/dist/binutils/ld/emultempl/elf32.em @@ -1393,7 +1393,8 @@ gld${EMULATION_NAME}_place_orphan (lang_input_statement_type *file, asection *s) else if (strncmp (secname, ".rel", 4) == 0 && (s->flags & SEC_LOAD) != 0) place = &hold[orphan_rel]; - else if ((s->flags & SEC_CODE) == 0) + else if ((s->flags & SEC_CODE) == 0 + && hold[orphan_rodata].os != NULL) place = &hold[orphan_rodata]; else place = &hold[orphan_text]; |
