[lld][failing test] the reason of ifunc.test failing

Hi,

It looks like the the ELFPassFile doesnot get an ordinal value assigned, as its added in a pass.

Is there a way to assign a file ordinal for the files added by Passes ?

Till that time, I am going to XFAIL the ifunc test.

More tests should fail, and am not sure why they are not failing.

Thanks

Shankar Easwaran

In addition I think the LayoutPass std::stable_sort be replaced with std::sort as total ordering is guaranteed as each File would get an ordinal and each atom would get an ordinal too, after the below problem is fixed.

Thanks

Shankar Easwaran

Ping ?

Do you think that we need to have an API in LinkingContext to return the next ordinal available, so that files created by passes can be assigned ordinals ?

Thanks

Shankar Easwaran

Ping ?

Do you think that we need to have an API in LinkingContext to return the
next ordinal available, so that files created by passes can be assigned
ordinals ?

That API may work, but I don't think you always want to assign the largest
file ordinal for a file created in a pass. If you want to assign the
smallest file ordinal, for example, then the API wouldn't work.

Its upto the context to return the nextOrdinal available or what the context could infer.

The default behavior could be return ordinals in increasing order.

Thanks

Shankar Easwaran

Ping ?

Do you think that we need to have an API in LinkingContext to return the
next ordinal available, so that files created by passes can be assigned
ordinals ?

That API may work, but I don't think you always want to assign the

largest
file ordinal for a file created in a pass. If you want to assign the
smallest file ordinal, for example, then the API wouldn't work.

Its upto the context to return the nextOrdinal available or what the
context could infer.

The default behavior could be return ordinals in increasing order.

That API sounds good to me.