/* gpu_v2_bad.c - ABI-breaking v2 but keeps the v1 SONAME.
 * THIS IS THE BUG: a library author ships a layout change but
 * doesn't bump the SONAME major version.
 *
 * Build: gcc -shared -fPIC -Wl,-soname,libgpu.so.1 -o libgpu.so.1.1.0 gpu_v2_bad.c
 * Then:  ln -sf libgpu.so.1.1.0 libgpu.so.1   (replaces the old v1 symlink)
 *        ln -sf libgpu.so.1     libgpu.so
 */

struct gpu_info {
    int temperature;  /* offset 0  <- was gpu_id! */
    int gpu_id;       /* offset 4  <- was temperature! */
    int power_usage;  /* offset 8  <- new */
};

void gpu_info_get(struct gpu_info *info) {
    info->temperature = 99;
    info->gpu_id = 42;
    info->power_usage = 250;
}
