Re: Linking issue using ld scripts

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

 



Remy Bruno <remy.bruno@xxxxxxxxxxxxxx> writes:

> I would like to get my sections unchanged, and if some data
> appears 10 times in 10 input object files, I want this data to appear 10 times
> in the output in the corresponding sections at the right places. I looked for
> switches doing this but didn't find them.

Use the gcc option -fno-merge-constants when you compile.

> I have to say that I found this sort of section modifications a little
> surprising. In my particular case (admittedly not common, but I won't elaborate
> on this now, this is not relevant), the program does not work as a result. But
> I imagine that it could have consequences on more standard applications: for
> example, I think this could change data alignment ; or remove elements in
> sections used as an array of data, as this is done for example in the kernel
> (cf section .initcall.init). I'm not an expert, that's just a guess.

Those are reasonable guesses, but in fact neither of these cases will
happen.

Ian

[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