[PATCH] D67125: [PowerPC][AIX] Adds support for writing the data section in object files

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 10:17:21 PDT 2019


sfertile added a comment.

In D67125#1725439 <https://reviews.llvm.org/D67125#1725439>, @daltenty wrote:

> In D67125#1725332 <https://reviews.llvm.org/D67125#1725332>, @daltenty wrote:
>
> > I don't think that initialized global data should be coming out as label symbols (everything appears to be contained in a ".data" csect). As I understand it only static data should be glob'd into one big csect, as per  the XCOFF spec "An initialized definition for a global data scalar or structure ... is contained in its own csect". So each of these globals should have their own csect, which is the behavior exhibited by XLC.
> >
> > I've observed that GCC on AIX is currently exhibiting this initalized-globals-in-one-csect behavior, but as we might expect, it interferes with the linkers ability to garbage collect unneeded global data.
> >
> > I believe this is also an issue in the assembly path in D66154 <https://reviews.llvm.org/D66154>
>
>
> As per out of band discussion, we will revisit this behavior under an option flag in a future revision and adopt the GCC behavior for now.


Yep, I was expecting we would transition to the described behaviour once we implement support for  `--ffunction-sections` and `--fdata-sections`.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67125/new/

https://reviews.llvm.org/D67125





More information about the llvm-commits mailing list