gold patch committed: Warn about _32 and _PC32 in shared object

Ian Lance Taylor iant@google.com
Wed Dec 15 15:43:00 GMT 2010


PR 12324 points out that gold does not issue the same warnings as GNU ld
when it comes to putting non-PIC relocations in shared objects.  When I
added the warning, I looked at the list of relocations that glibc
supports, but I didn't consider that two of them can overflow at
runtime.  This patch warns about those two.  I had to adjust a test case
to compile with -fpic.  Committed to mainline.

Ian


2010-12-15  Ian Lance Taylor  <iant@google.com>

	PR gold/12324
	* x86_64.cc (Target_x86_64::Scan::check_non_pic): Give an error
	for R_X86_64_32 and R_X86_64_PC32.
	* testsuite/Makefile.am (ver_matching_def.so): Depend on and use
	ver_matching_def_pic.o.
	(ver_matching_def_pic.o): New target.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-diff
Size: 2468 bytes
Desc: warn
URL: <https://sourceware.org/pipermail/binutils/attachments/20101215/9045a3dd/attachment.bin>


More information about the Binutils mailing list