From: Alan Modra <amodra@bigpond.net.au>
To: Etienne Lorrain <etienne_lorrain@yahoo.fr>
Cc: binutils@sourceware.org
Subject: Re: `.sym' referenced in section `reloc_sym' of file.o: defined in discarded section `.text.sym' of file.o
Date: Fri, 19 May 2006 11:50:00 -0000 [thread overview]
Message-ID: <20060519060903.GC22757@bubble.grove.modra.org> (raw)
In-Reply-To: <20060517110343.17891.qmail@web26907.mail.ukl.yahoo.com>
On Wed, May 17, 2006 at 01:03:43PM +0200, Etienne Lorrain wrote:
> > > ld: error: no memory region specified for loadable section `.rel.dyn'
>
> Looks like that is now a warning - I do not understand why.
ld/
* ldlang.c (lang_size_sections_1): Don't check mem regions for
os->ignored sections.
ld/testsuite/
* ld-scripts/empty-orphan.t: Discard .reginfo.
* ld-scripts/empty-orphan.d: Update.
Index: ld/ldlang.c
===================================================================
RCS file: /cvs/src/src/ld/ldlang.c,v
retrieving revision 1.218
diff -u -p -r1.218 ldlang.c
--- ld/ldlang.c 17 May 2006 16:46:54 -0000 1.218
+++ ld/ldlang.c 19 May 2006 02:39:55 -0000
@@ -4198,7 +4198,8 @@ lang_size_sections_1
/* If a loadable section is using the default memory
region, and some non default memory regions were
defined, issue an error message. */
- if (!IGNORE_SECTION (os->bfd_section)
+ if (!os->ignored
+ && !IGNORE_SECTION (os->bfd_section)
&& ! link_info.relocatable
&& check_regions
&& strcmp (os->region->name,
Index: ld/testsuite/ld-scripts/empty-orphan.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/empty-orphan.d,v
retrieving revision 1.1
diff -u -p -r1.1 empty-orphan.d
--- ld/testsuite/ld-scripts/empty-orphan.d 17 Mar 2005 16:20:39 -0000 1.1
+++ ld/testsuite/ld-scripts/empty-orphan.d 19 May 2006 02:39:55 -0000
@@ -1,3 +1,10 @@
#source: empty-orphan.s
#ld: -T empty-orphan.t
-#error: no memory region specified for loadable section
+#readelf: -l --wide
+#...
+Program Headers:
+ +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg +Align
+ +LOAD +[x0-9a-f]+ 0x0+ 0x0+ 0x0+ 0x0+ .*
+ +LOAD +[x0-9a-f]+ 0x0+ 0x0+ 0x0+ 0x0+ .*
+ +LOAD +[x0-9a-f]+ [x0]+70000000 [x0]+70000000 [x0]+(2|4|8|10|20|40|80) .*
+#pass
Index: ld/testsuite/ld-scripts/empty-orphan.t
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/empty-orphan.t,v
retrieving revision 1.1
diff -u -p -r1.1 empty-orphan.t
--- ld/testsuite/ld-scripts/empty-orphan.t 17 Mar 2005 16:20:39 -0000 1.1
+++ ld/testsuite/ld-scripts/empty-orphan.t 19 May 2006 02:39:55 -0000
@@ -17,5 +17,6 @@ SECTIONS
.text : { *(.text) } > text_mem : text_phdr
.data : { *(.data) } > data_mem : data_phdr
.bss : { *(.bss) } > data_mem : data_phdr
+ /DISCARD/ : { *(.reginfo) }
/* .orphan_data is an orphan */
}
--
Alan Modra
IBM OzLabs - Linux Technology Centre
next prev parent reply other threads:[~2006-05-19 6:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-16 15:28 Etienne Lorrain
2006-05-16 22:39 ` Alan Modra
2006-05-16 22:47 ` Etienne Lorrain
2006-05-17 11:34 ` Alan Modra
2006-05-17 15:32 ` Fix regression introduced 2006-04-21 Alan Modra
2006-05-17 16:19 ` `.sym' referenced in section `reloc_sym' of file.o: defined in discarded section `.text.sym' of file.o Etienne Lorrain
2006-05-19 11:50 ` Alan Modra [this message]
2006-05-19 15:30 ` Etienne Lorrain
2006-05-19 15:37 ` Alan Modra
2006-05-19 15:57 ` Etienne Lorrain
2006-05-20 13:56 ` Alan Modra
2006-05-16 22:37 Etienne Lorrain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060519060903.GC22757@bubble.grove.modra.org \
--to=amodra@bigpond.net.au \
--cc=binutils@sourceware.org \
--cc=etienne_lorrain@yahoo.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).