Re: Propagating addresses from linker to the runtie

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

 



On Fri, Oct 18, 2019 at 07:51:38AM -0500, Segher Boessenkool wrote:
[ ... ]
> Using reserved names (like those starting with two underscores) is UB
> already.

What does "UB" mean?

> > > To get this conforming, the linker would need to export a symbol to the start
> > > of the section and the length of the section, IMHO.
> > 
> > Right, but we do not have that today. 8-(
> 
> We have had it since over 25 years:
> 
> Thu Aug 18 15:37:45 1994  Ian Lance Taylor  (ian@xxxxxxxxxxxxxxxxxxx)
> 
> 	Make the ELF linker handle orphaned sections reasonably.  Also,
> 	define __start_SECNAME and __stop_SECNAME around sections whose
> 	names can be represented in C, for the benefit of symbol sets in
> 	glibc.

???

I was talking about exporting start+length instead of start+stop.

Having start+length would allow a confirming implementation, because pointer
arithmetic on unrelated objects would no longer be needed:

    unsigned long *dst = &_s_bss;
    for (n = 0; n < _l_bss / sizeof (unsigned long); n++)
        dst[n] = 0;


-- 
Josef Wolf
jw@xxxxxxxxxxxxx



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux