Re: Urgent: x86-32 and GNU ld 2.22.52.0.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 18, 2012 at 9:46 AM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
> On 05/18/2012 09:35 AM, H.J. Lu wrote:
>>
>> In that case, both 2.22.52.0.1 and 2.22.52.0.2 are bad.
>>
>
> I suspect that really means we should have a patch which verifies by
> construction, and not rely on version numbers.
>

A small testcase:

[hjl@gnu-6 pr14052]$ cat pr14052.s
	.text
	.global start	/* Used by SH targets.  */
start:
	.global _start
_start:
	.global __start
__start:
	.global main	/* Used by HPPA targets.  */
main:
	.dc.a 0
[hjl@gnu-6 pr14052]$ cat pr14052.t
SECTIONS {
	.text : {
		*(.text)
	}
	. = ALIGN (0x1000);
	.data : {
		_data_start = .;
		*(.data)
	}
	/DISCARD/ : { *(.*) }
}
[hjl@gnu-6 pr14052]$ make
as   -o pr14052.o pr14052.s
./ld  -o pr14052 -T pr14052.t pr14052.o
readelf -s pr14052

Symbol table '.symtab' contains 7 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 0000000000000000     0 SECTION LOCAL  DEFAULT    1
     2: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT    1 __start
     3: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT    1 _start
     4: 0000000000001000     0 NOTYPE  GLOBAL DEFAULT    1 _data_start
     5: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT    1 main
     6: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT    1 start
[hjl@gnu-6 pr14052]$

There should be no symbols in ABS section.

-- 
H.J.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[Index of Archives]

  Powered by Linux

[Older Kernel Discussion]     [Yosemite National Park Forum]     [Large Format Photos]     [Gimp]     [Yosemite Photos]     [Stuff]     [Index of Other Archives]